Untitled

 avatar
unknown
plain_text
a year ago
459 B
3
Indexable
import matplotlib.pyplot as plt

# Punkter for Karen: y = 4x
karen_x = [0, 1, 2, 3, 4, 5]
karen_y = [0, 4, 8, 12, 16, 20]

# Punkter for Turid: y = 6x
turid_x = [0, 1, 2, 3, 4, 5]
turid_y = [0, 6, 12, 18, 24, 30]

# Plotting
plt.plot(karen_x, karen_y, label='Karen (4x)')
plt.plot(turid_x, turid_y, label='Turid (6x)')

plt.xlabel('Antall dager (x)')
plt.ylabel('Antall kilometer (y)')
plt.title('Graf av likningene')

plt.legend()
plt.grid(True)
plt.show()

Editor is loading...
Leave a Comment