1

I have a problem with matplotlib on my os x Mavericks. when I want to plot, the figure window appears but I don't see any plot in it. Apparently, it has crashed or something since it is also non responsive. I can see the circling os x figure also.

Fig window: https://www.dropbox.com/s/oasrf22crgtjr6u/Screenshot%202015-02-16%2001.04.10.png?dl=0

The command I have entered is this: plt.hist([1,2,3])

I am using matplotlib 1.4.2, iPython 2.3.1, and Python 2.7.

UPDATE: This problem doesn't occur when I use regular Python interpreter. Only when I am using iPython.

Appreciate any assistance.

1 Answer 1

1

Directly from the matplotlib website:

import matplotlib.pyplot as plt
plt.plot([1,2,3,])
plt.ylabel('some numbers')
plt.show()

This works for me.

Have you imported matplotlib? Are you running ipython with qtconsole? Have you updated everything?

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

5 Comments

I have imported everything. I am using Pycharm and when I installed iPython the default interpreter in Pycharm changed to iPython. Don't know what you mean by qtconsole. Also, I think everything related is up to date.
When loading python from terminal, load it with "ipython qtconsole" and the graphs should appear.
If you're not using anaconda, I suggest you download it. It has a ton of packages and lets you know when things are out of date.
Thanks. It worked. I hadn't installed 'pyqt' and 'pygments'. After installing them everything worked just fine.
Great :) Have fun with your project!

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.