Difference between revisions of "File:Besselk,n=0plot.png"
From specialfunctionswiki
(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,5,0.01); x2=np.arange(-15,15,0.1); j0=np.vectorize(lambda...) |
|||
Line 10: | Line 10: | ||
x2=np.arange(-15,15,0.1); | x2=np.arange(-15,15,0.1); | ||
j0=np.vectorize(lambda x: besselk(0,x)) | j0=np.vectorize(lambda x: besselk(0,x)) | ||
− | |||
− | |||
− | |||
− | |||
y0=j0(x) | y0=j0(x) | ||
− | |||
− | |||
− | |||
def h(x): | def h(x): | ||
Line 30: | Line 23: | ||
plt.plot(x,y0,linewidth=2,color='Black',label=r'$K_0(x)$') | plt.plot(x,y0,linewidth=2,color='Black',label=r'$K_0(x)$') | ||
− | |||
− | |||
− | |||
plt.plot(yatzero,x2,'--',linewidth=2,color='Black') | plt.plot(yatzero,x2,'--',linewidth=2,color='Black') | ||
plt.plot(x2,yatzero,'--',linewidth=2,color='Black') | plt.plot(x2,yatzero,'--',linewidth=2,color='Black') |
Latest revision as of 23:46, 10 June 2016
#!/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,5,0.01); x2=np.arange(-15,15,0.1); j0=np.vectorize(lambda x: besselk(0,x)) y0=j0(x) def h(x): return 0 k=np.vectorize(h) yatzero=k(x2) fig, ax = plt.subplots() plt.xlabel(r'$x$') plt.ylabel('$K_0(x)$') plt.plot(x,y0,linewidth=2,color='Black',label=r'$K_0(x)$') plt.plot(yatzero,x2,'--',linewidth=2,color='Black') plt.plot(x2,yatzero,'--',linewidth=2,color='Black') plt.xlim(-0.3,5) plt.ylim(-0.3,2) plt.savefig('besselk,n=0plot.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 | 23:45, 10 June 2016 | 867 × 885 (27 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,5,0.01); x2=np.arange(-15,15,0.1); j0=np.vectorize(lambda... |
- You cannot overwrite this file.
File usage
The following page links to this file: