File:Siplot.png
From specialfunctionswiki
Size of this preview: 589 × 599 pixels. Other resolutions: 236 × 240 pixels | 861 × 876 pixels.
Original file (861 × 876 pixels, file size: 30 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(-30,30,0.001); f=np.vectorize(si) y1=f(x) def g(x): return 1.570796 def h(x): return -1.570796 j=np.vectorize(g) k=np.vectorize(h) y2=j(x) y3=k(x) fig, ax = plt.subplots() xlabels = [item.get_text() for item in ax.get_xticklabels()] xlabels=[r'$-25$',r'$-20$',r'$-15$',r'$-10$',r'$-5$',r'$0$',r'$5$',r'$10$',r'$15$',r'$20$',r'$25$'] ax.set_xticks([-25,-20,-15,-10,-5,0,5,10,15,20,25]) ax.set_xticklabels(xlabels,horizontalalignment='center') ylabels = [item.get_text() for item in ax.get_yticklabels()] ylabels=[r'$-\frac{\pi}{2}$',r'$0$',r'$\frac{\pi}{2}$'] ax.set_yticks([-1.570796,0,1.570596]) ax.set_yticklabels(ylabels,horizontalalignment='right') plt.xlabel(r'$x$') plt.ylabel(r'$\mathrm{Si}(x)$') plt.plot(x,y1,linewidth=2,color='Black') plt.plot(x,y2,'--',linewidth=2,color='Black') plt.plot(x,y3,'--',linewidth=2,color='Black') plt.savefig('siplot.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 | 21:46, 23 May 2016 | 861 × 876 (30 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(-30,30,0.001); f=np.vectorize(si) y1=f(x) def g(x): re... |
- You cannot overwrite this file.
File usage
The following page links to this file: