Advertisement
kubasal

dynsys

Apr 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. # arrange, linspace, pi, zeros, sin, cos
  2. import numpy
  3. # plot, show, legend, xlabel, ylabel, figure, axis
  4. import matplotlib.pyplot as plot
  5.  
  6. # numpy.arrange = zakres od do krok
  7. # numpy.linspace = od do ilosc krokow
  8.  
  9. x = numpy.arange(0, 10, .01)
  10. y1 = numpy.sin(2*x)
  11. y2 = numpy.cos(3*x)
  12. plot.figure(1)
  13. plot.plot(x, y1, 'k', label='sinus')
  14. plot.plot(x, y2, 'g', label='cosinus')
  15. plot.legend(loc='upper right')
  16. plot.xlabel('os x', fontsize=14)
  17. plot.ylabel('os y', fontsize=14)
  18. # plot.figure(2)
  19. plot.plot(y1, y2)
  20. plot.axis('equal')
  21.  
  22. plot.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement