File:Multiplebesselyplot.png
From specialfunctionswiki
Size of this preview: 597 × 600 pixels. Other resolutions: 239 × 240 pixels | 881 × 885 pixels.
Original file (881 × 885 pixels, file size: 107 KB, MIME type: image/png)
#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 x=np.arange(0.01,20,0.01); j0=np.vectorize(lambda x: bessely(0,x)) j1=np.vectorize(lambda x: bessely(1,x)) j2=np.vectorize(lambda x: bessely(2,x)) j3=np.vectorize(lambda x: bessely(3,x)) y0=j0(x) y1=j1(x) y2=j2(x) y3=j3(x) def h(x): return 0 k=np.vectorize(h) yatzero=k(x) fig, ax = plt.subplots() #xlabels = [item.get_text() for item in ax.get_xticklabels()] #xlabels=[r'$-20$',r'$-15$',r'$-10$',r'$-5$',r'$0$',r'$j_{0,1}$',r'$j_{0,2}$',r'$j_{0,3}$',r'$j_{0,4}$',r'$j_{0,5}$',r'$j_{0,6}$',r'$20$'] #ax.set_xticks([-20,-15,-10,-5,0,2.40483,5.52008,8.65373,11.7915,14.9309,18.0711,20]) #ax.set_xticklabels(xlabels,horizontalalignment='center') plt.xlabel(r'$x$') plt.ylabel('Various Bessel functions') plt.ylim(-1,0.6) plt.plot(x,y0,linewidth=2,color='Red',label=r'$Y_0(x)$') plt.plot(x,yatzero,'--',linewidth=2,color='Black') plt.plot(x,y1,linewidth=2,color='Blue',label=r'$Y_1(x)$') plt.plot(x,y2,linewidth=2,color='Green',label=r'$Y_2(x)$') plt.plot(x,y3,linewidth=2,color='Orange',label=r'$Y_3(x)$') plt.legend(loc='best') plt.savefig('multiplebesselyplot.png',bbox_inches='tight',pad_inches=0.15)
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 19:24, 10 June 2016 | 881 × 885 (107 KB) | Tom (talk | contribs) | Category:Plot <pre>#!/usr/bin/python import numpy as np import matplotlib.pyplot as plt from mpmath import * from pylab import rcParams rcParams['figure.figsize'] = 10, 10 x=np.arange(0.01,20,0.01); j0=np.vectorize(lambda x: bessely(0,x)) j1=np.ve... |
- You cannot overwrite this file.
File usage
The following page links to this file: