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

Skip to content

Commit 97ca9bb

Browse files
committed
mep12 on ginput_demo.py
1 parent e62d9fa commit 97ca9bb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/pylab_examples/ginput_demo.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
from __future__ import print_function
44

5-
from pylab import arange, plot, sin, ginput, show
6-
t = arange(10)
7-
plot(t, sin(t))
5+
import matplotlib.pyplot as plt
6+
import numpy as np
7+
t = np.arange(10)
8+
plt.plot(t, np.sin(t))
89
print("Please click")
9-
x = ginput(3)
10+
x = plt.ginput(3)
1011
print("clicked", x)
11-
show()
12+
plt.show()

0 commit comments

Comments
 (0)