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

Skip to content

Commit 9e905ce

Browse files
committed
Merge pull request #4884 from ericmjl/manual_axis.py_mep12
mep12 on manual_axis.py
2 parents 7900ee4 + 21dfdff commit 9e905ce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/pylab_examples/manual_axis.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
66
This example should be considered deprecated and is left just for demo
77
purposes for folks wanting to make a pseudo-axis
8-
98
"""
109

1110
import numpy as np
12-
from pylab import figure, show
11+
import matplotlib.pyplot as plt
1312
import matplotlib.lines as lines
1413

1514

@@ -47,7 +46,7 @@ def make_yaxis(ax, xloc=0, offset=0.05, **props):
4746
props = dict(color='black', linewidth=2, markeredgewidth=2)
4847
x = np.arange(200.)
4948
y = np.sin(2*np.pi*x/200.) + np.random.rand(200) - 0.5
50-
fig = figure(facecolor='white')
49+
fig = plt.figure(facecolor='white')
5150
ax = fig.add_subplot(111, frame_on=False)
5251
ax.axison = False
5352
ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue')
@@ -56,4 +55,4 @@ def make_yaxis(ax, xloc=0, offset=0.05, **props):
5655
make_xaxis(ax, 0, offset=0.1, **props)
5756
make_yaxis(ax, 0, offset=5, **props)
5857

59-
show()
58+
plt.show()

0 commit comments

Comments
 (0)