Facebook
From Scanty Parakeet, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 275
  1. import matplotlib.pyplot as plt
  2.  
  3. x=[-4, -3, -2, -1, 0, 1, 2, 3, 4]
  4. y=[]
  5. for liczba in x:
  6.     y+=[liczba**2]
  7.  
  8. plt.plot(y)
  9. plt.xlabel('X')
  10. plt.ylabel('Y')
  11.  
  12. y1=[]
  13. for liczba in x:
  14.     y1+=[liczba**2+1]
  15.  
  16. plt.plot(x, y1, 'ro-')
  17.  
  18. plt.show()
  19.