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

Skip to content

Commit 8cde3c8

Browse files
committed
mep12 on manual_axis.py
1 parent 7b89443 commit 8cde3c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/pylab_examples/manual_axis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
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+
# from pylab import figure, show
12+
import matplotlib.pyplot as plt
1313
import matplotlib.lines as lines
1414

1515

@@ -47,7 +47,7 @@ def make_yaxis(ax, xloc=0, offset=0.05, **props):
4747
props = dict(color='black', linewidth=2, markeredgewidth=2)
4848
x = np.arange(200.)
4949
y = np.sin(2*np.pi*x/200.) + np.random.rand(200) - 0.5
50-
fig = figure(facecolor='white')
50+
fig = plt.figure(facecolor='white')
5151
ax = fig.add_subplot(111, frame_on=False)
5252
ax.axison = False
5353
ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue')
@@ -56,4 +56,4 @@ def make_yaxis(ax, xloc=0, offset=0.05, **props):
5656
make_xaxis(ax, 0, offset=0.1, **props)
5757
make_yaxis(ax, 0, offset=5, **props)
5858

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

0 commit comments

Comments
 (0)