0

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.

2
  • Sorry the only output is "[<matplotlib.lines.Line2D object at 0x116c6f160>]" Commented Mar 27, 2015 at 4:04
  • 1
    When you look at the code for the examples in the gallery, can you see what yours is missing? Commented Mar 27, 2015 at 4:42

1 Answer 1

3

You have to tell the plot to show itself with:

plt.show()

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.