Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
417 B
1
Indexable
Never
import matplotlib.pyplot as plt

# Data
pendulum_lengths = [100, 85, 70, 55, 36]
periods = [2, 1.97, 1.8, 1.6, 1.4]

# Plot
plt.figure(figsize=(8, 6))
plt.plot(pendulum_lengths, periods, marker='o', color='b', linestyle='-')

# Title and labels
plt.title('Pendulum Length vs. Period')
plt.xlabel('Pendulum Length (cm)')
plt.ylabel('Period (s)')

# Show grid
plt.grid(True)

# Show plot
plt.show()
Leave a Comment