You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
459 B
17 lines
459 B
#pip install matplotlib numpy
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
|
|
print("vykreslím jednoduchý graf, pro další graf vypněte předchozí okno")
|
|
xp = np.array([1,2,6,8,10])
|
|
yp = np.array([3,8,4,10,1])
|
|
plt.plot(xp,yp)
|
|
plt.show()
|
|
|
|
print("vykreslím jednoduchý graf, pro další graf vypněte předchozí okno")
|
|
x = np.arange(0, 4*np.pi,0.1)
|
|
y1 = np.sin(x)
|
|
y2 = np.cos(x)
|
|
plt.plot(x,y1,color="green")
|
|
plt.plot(x,y2,color="darkblue")
|
|
plt.show()
|