Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- a=float(input('a='))
- b=float(input('b='))
- c=float(input('c='))
- dx=float(input('dx='))
- x=np.arange(1,2*np.pi,dx)
- fig,axs = plt.subplots(2,2,figsize=(12,7))
- plt.subplots_adjust(hspace=0.4)
- axs[0,0].plot(x,np.sqrt((1.2*a+c*np.log(x))/2/b*np.exp(x)),'o-r')
- axs[0,1].plot(x,np.sin(x)+0.1*b**2+c*np.exp(np.cos(x)),'--g')
- axs[1,0].plot(x,a*(b+c)/(2*x**2+x+0.6)*np.sin(x)+np.exp(a),'<m')
- axs[1,1].plot(x,b/(a*x**2+3)+np.log(b)*np.sin(x**3)+c,'-.')
- axs[0, 0].set_title("Title 1")
- axs[0, 1].set_title("Title 2")
- axs[1, 0].set_title("Title 3")
- axs[1, 1].set_title("Title 4")
- axs[0,0].set_xlabel('x')
- axs[0,0].set_ylabel('y', color='red')
- axs[0,1].set_xlabel('x')
- axs[0,1].set_ylabel('y', color='green')
- axs[1,0].set_xlabel('x')
- axs[1,0].set_ylabel('y', color='purple')
- axs[1,1].set_xlabel('x')
- axs[1,1].set_ylabel('y', color='blue')
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment