Untitled
unknown
plain_text
a year ago
417 B
6
Indexable
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()
Editor is loading...
Leave a Comment