File:Arccscplot.png

From specialfunctionswiki
Jump to: navigation, search
Original file(861 × 888 pixels, file size: 24 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

x1=np.arange(-10,-1,0.0001);
x2=np.arange(1,10,0.0001);
f=np.vectorize(acsc)
y1=f(x1)
y2=f(x2)

fig, ax = plt.subplots()

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

ylabels = [item.get_text() for item in ax.get_yticklabels()]
ylabels[0]=r'$-\frac{\pi}{2}$'
ylabels[1]=r'$0$'
ylabels[2]=r'$\frac{\pi}{2}$'
ax.set_yticks([-1.557,0,1.5705])
ax.set_yticklabels(ylabels,horizontalalignment='right')

plt.xlabel('$x$')
plt.ylabel('$\mathrm{arccsc}(x)$')

plt.plot(x1,y1,linewidth=2,color='Black')
plt.plot(x2,y2,linewidth=2,color='Black')

plt.savefig('arccscplot.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
current04:39, 16 May 2016Thumbnail for version as of 04:39, 16 May 2016861 × 888 (24 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 x1=np.arange(-10,-1,0.0001); x2=np.arange(1,10,0.0001); f=np.vectorize(acsc...
  • You cannot overwrite this file.

The following page links to this file:

Metadata