Have recently started playing with Python. I have installed Python Spyder app on the Mac. Everything has been working well until recently for some reason the matplotlib charts stopped displaying. A simple code like this does not work anymore:
import matplotlib.pyplot as plt
x = np.linspace(0.4 * np.pi, 100)
plt.plot(x)
The only output is []
I have Spyder 2.3.3, Python 3.4.3 64 Bit.
-
Sorry the only output is "[<matplotlib.lines.Line2D object at 0x116c6f160>]"Aleksey Matiychenko– Aleksey Matiychenko2015年03月27日 04:04:53 +00:00Commented Mar 27, 2015 at 4:04
-
1When you look at the code for the examples in the gallery, can you see what yours is missing?wwii– wwii2015年03月27日 04:42:11 +00:00Commented Mar 27, 2015 at 4:42
1 Answer 1
You have to tell the plot to show itself with:
plt.show()
answered Mar 27, 2015 at 4:10
Loocid
6,5111 gold badge30 silver badges46 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-py