diff --git a/examples/pylab_examples/ginput_demo.py b/examples/pylab_examples/ginput_demo.py index 4ef3c617a1dc..f92f16917a71 100644 --- a/examples/pylab_examples/ginput_demo.py +++ b/examples/pylab_examples/ginput_demo.py @@ -2,10 +2,11 @@ from __future__ import print_function -from pylab import arange, plot, sin, ginput, show -t = arange(10) -plot(t, sin(t)) +import matplotlib.pyplot as plt +import numpy as np +t = np.arange(10) +plt.plot(t, np.sin(t)) print("Please click") -x = ginput(3) +x = plt.ginput(3) print("clicked", x) -show() +plt.show()