File:Chebyshevplotfrom0to1000.png
From specialfunctionswiki
Revision as of 02:12, 28 November 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 def isValid(n): if (n <=0): return 0 elif...)
Size of this preview: 608 × 599 pixels. Other resolutions: 244 × 240 pixels | 898 × 885 pixels.
Original file (898 × 885 pixels, file size: 29 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 def isValid(n): if (n <=0): return 0 elif (n-int(n) != 0): return 0 return 1 def isPrime(n): return not (n < 2 or any(n % i == 0 for i in range(2, int(n**0.5)+1))) def Chebyshev(n): if not isValid(n): return 0 chebyshev = 0 for p in range(1,n): if (isPrime(p)): chebyshev += log(p) return chebyshev x=np.arange(0,1000,0.01); f=np.vectorize(lambda x: Chebyshev(floor(x))) y=f(x) fig, ax = plt.subplots() plt.xlabel(r'$x$') plt.ylabel(r'$\vartheta(x)$') plt.plot(x,y,linewidth=2,color='Black') plt.savefig('chebyshevplot.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 | 02:12, 28 November 2016 | 898 × 885 (29 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 def isValid(n): if (n <=0): return 0 elif... |
- You cannot overwrite this file.
File usage
The following page links to this file: