Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. from matplotlib.pylab import *
  2.  
  3. def f1(t):
  4.     return t**4*exp(-t**4)
  5. def f2(t):
  6.     return t**2*f1(t)
  7. figure()
  8. subplot(2, 1, 1)
  9. t=linspace(0, 3, 51)
  10. y1=f1(t)
  11. plot(t, y1)
  12. xlabel('x')
  13. ylabel('y')
  14. legend(['pierwsza funkcja'])
  15. axis([0, 3, -0.1, 0.7])
  16. title('jeden')
  17.  
  18. subplot(2, 1, 2)
  19. t=linspace(0, 6, 51)
  20. y2=f2(t)
  21. plot(t, y2)
  22. xlabel('x')
  23. ylabel('y')
  24. legend(['druga funkcja'])
  25. axis([0, 3, -0.1, 0.7])
  26. title('dwa')
  27.  
  28.  
  29. savefig('wykres2w1.png')
  30. show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement