forked from rougier/matplotlib-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
27 lines (21 loc) · 738 Bytes
/
plot.py
File metadata and controls
27 lines (21 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from pylab import *
n = 256
X = np.linspace(0,2,n)
Y = np.sin(2*np.pi*X)
plt.plot (X, Y, lw=2, color='violet')
xlim(-0.2,2.2), xticks([])
ylim(-1.2,1.2), yticks([])
plt.text(-0.05, 1.05, " Regular Plot \n\n",
horizontalalignment='left',
verticalalignment='top',
family='Lint McCree Intl BB',
size='x-large',
bbox=dict(facecolor='white', alpha=1.0, width=350,height=60),
transform = gca().transAxes)
plt.text(-0.05, .975, " Plot lines and/or markers ",
horizontalalignment='left',
verticalalignment='top',
family='Lint McCree Intl BB',
size='medium',
transform = gca().transAxes)
plt.savefig('../figures/plot.png', dpi=64)