Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 76b049d

Browse files
committed
Merge pull request matplotlib#4881 from ericmjl/matplotlib_icon.py_mep12
mep12 on matplotlib_icon.py
2 parents 7b89443 + 7dbc7fc commit 76b049d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
#!/usr/bin/env python
21
"""
32
make the matplotlib svg minimization icon
43
"""
4+
import matplotlib.pyplot as plt
55
import matplotlib
6-
#matplotlib.use('Svg')
7-
from pylab import *
6+
import numpy as np
87

9-
rc('grid', ls='-', lw=2, color='k')
10-
fig = figure(figsize=(1, 1), dpi=72)
11-
axes([0.025, 0.025, 0.95, 0.95], axisbg='#bfd1d4')
8+
matplotlib.rc('grid', ls='-', lw=2, color='k')
9+
fig = plt.figure(figsize=(1, 1), dpi=72)
10+
plt.axes([0.025, 0.025, 0.95, 0.95], axisbg='#bfd1d4')
1211

13-
t = arange(0, 2, 0.05)
14-
s = sin(2*pi*t)
15-
plot(t, s, linewidth=4, color="#ca7900")
16-
axis([-.2, 2.2, -1.2, 1.2])
12+
t = np.arange(0, 2, 0.05)
13+
s = np.sin(2*np.pi*t)
14+
plt.plot(t, s, linewidth=4, color="#ca7900")
15+
plt.axis([-.2, 2.2, -1.2, 1.2])
1716

18-
# grid(True)
19-
setp(gca(), xticklabels=[], yticklabels=[])
20-
savefig('matplotlib', facecolor='0.75')
17+
ax = plt.gca()
18+
ax.set_xticklabels([])
19+
ax.set_yticklabels([])
20+
21+
plt.show()

0 commit comments

Comments
 (0)