From 97ca9bb52e22fd6570dd74ecf731c6ab5980d872 Mon Sep 17 00:00:00 2001 From: Eric Ma Date: Wed, 9 Sep 2015 16:17:32 -0400 Subject: [PATCH] mep12 on ginput_demo.py --- examples/pylab_examples/ginput_demo.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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()