File:Anger0.5plot.png

From specialfunctionswiki
Jump to: navigation, search
Original file(880 × 885 pixels, file size: 50 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(-25,25,0.01);
def angerintegrand(t,n,x):
        return cos(n*t-x*sin(t))
def anger(n,x):
        return (1/pi)*quad(lambda t: angerintegrand(t,n,x),[0,pi])
f=np.vectorize(lambda x: anger(0.5,x))
y=f(x)

fig, ax = plt.subplots()

xlabels = [item.get_text() for item in ax.get_xticklabels()]
xlabels=[r'$-20$',r'$-10$',r'$0$',r'$10$',r'$20$']
ax.set_xticks([-20,-10,0,10,20])
ax.set_xticklabels(xlabels,horizontalalignment='center')

plt.xlabel(r'$x$')
plt.ylabel(r'$\bf{J}_{1/2}(x)$')

plt.plot(x,y,linewidth=2,color='Black')

plt.savefig('anger0.5plot.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/TimeThumbnailDimensionsUserComment
current16:28, 23 May 2016Thumbnail for version as of 16:28, 23 May 2016880 × 885 (50 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(-25,25,0.01); def angerintegrand(t,n,x): return cos(n*t...
  • You cannot overwrite this file.

The following page links to this file:

Metadata