File:Binomialcoefficient,n=20plot.png

From specialfunctionswiki
Revision as of 18:37, 25 September 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(-5,26,1); f=np.vectorize(lambda x: binomial(20,x)) y=f(x) g=np....)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Original file(907 × 885 pixels, file size: 18 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(-5,26,1);
f=np.vectorize(lambda x: binomial(20,x))
y=f(x)
g=np.vectorize(lambda x: 1)
xhoriz=np.arange(-50,50,0.1);
yhoriz=g(xhoriz)

fig, ax = plt.subplots()

plt.xlabel(r'$k$')
plt.ylabel(r'$\binom{20}{k}$')

plt.ylim(-2000,200000)
plt.xlim(-5.3,25.3)

plt.scatter(x,y,linewidth=2,color='Black')
plt.plot(xhoriz,yhoriz,'--',linewidth=2,color='Black')

plt.savefig('binomialcoefficient,n=20plot.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
current18:37, 25 September 2016Thumbnail for version as of 18:37, 25 September 2016907 × 885 (18 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(-5,26,1); f=np.vectorize(lambda x: binomial(20,x)) y=f(x) g=np....
  • You cannot overwrite this file.

The following page links to this file:

Metadata