File:Besselk,n=0plot.png

From specialfunctionswiki
Revision as of 23:45, 10 June 2016 by 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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Original file(867 × 885 pixels, file size: 27 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,5,0.01);
x2=np.arange(-15,15,0.1);
j0=np.vectorize(lambda x: besselk(0,x))
#j1=np.vectorize(lambda x: besselk(1,x))
#j2=np.vectorize(lambda x: besselk(2,x))
#j3=np.vectorize(lambda x: besselk(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(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(x,y1,linewidth=2,color='Blue',label=r'$K_1(x)$')
#plt.plot(x,y2,linewidth=2,color='Green',label=r'$K_2(x)$')
#plt.plot(x,y3,linewidth=2,color='Orange',label=r'$K_3(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/TimeThumbnailDimensionsUserComment
current23:45, 10 June 2016Thumbnail for version as of 23:45, 10 June 2016867 × 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.

The following page links to this file:

Metadata