Vla_DOS

Untitled

Mar 23rd, 2022
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.89 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4. a=float(input('a='))
  5. b=float(input('b='))
  6. c=float(input('c='))
  7. dx=float(input('dx='))
  8. x=np.arange(1,2*np.pi,dx)
  9. fig,axs = plt.subplots(2,2,figsize=(12,7))
  10. plt.subplots_adjust(hspace=0.4)
  11.  
  12. axs[0,0].plot(x,np.sqrt((1.2*a+c*np.log(x))/2/b*np.exp(x)),'o-r')
  13. axs[0,1].plot(x,np.sin(x)+0.1*b**2+c*np.exp(np.cos(x)),'--g')
  14. axs[1,0].plot(x,a*(b+c)/(2*x**2+x+0.6)*np.sin(x)+np.exp(a),'<m')
  15. axs[1,1].plot(x,b/(a*x**2+3)+np.log(b)*np.sin(x**3)+c,'-.')
  16.  
  17. axs[0, 0].set_title("Title 1")
  18. axs[0, 1].set_title("Title 2")
  19. axs[1, 0].set_title("Title 3")
  20. axs[1, 1].set_title("Title 4")
  21. axs[0,0].set_xlabel('x')
  22. axs[0,0].set_ylabel('y', color='red')
  23. axs[0,1].set_xlabel('x')
  24. axs[0,1].set_ylabel('y', color='green')
  25. axs[1,0].set_xlabel('x')
  26. axs[1,0].set_ylabel('y', color='purple')
  27. axs[1,1].set_xlabel('x')
  28. axs[1,1].set_ylabel('y', color='blue')
  29. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment