Untitled
unknown
plain_text
17 days ago
640 B
3
Indexable
import matplotlib.pyplot as plt # Data days = [0, 1, 2, 3, 4, 5, 6, 7] grow_light = [0, 0.75, 1, 1.25, 1.35, 1.45, 1.75, 2] fluorescent = [0, 0.2, 0.5, 0.75, 1, 1.25, 1.45, 1.65] darkness = [0, 0, 0.2, 0.35, 0.45, 0.75, 1, 1.25] # Create the plot plt.plot(days, grow_light, label="Grow Light", marker='o') plt.plot(days, fluorescent, label="Fluorescent", marker='o') plt.plot(days, darkness, label="Darkness", marker='o') # Adding titles and labels plt.title("Plant Growth Over 7 Days Under Different Light Conditions") plt.xlabel("Days") plt.ylabel("Growth (cm)") # Show legend plt.legend() # Show the plot plt.grid(True) plt.show()
Editor is loading...
Leave a Comment