Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
459 B
1
Indexable
Never
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()

Leave a Comment