Ashkan
Ashkan

Reputation: 1673

Python Matplotlib crashes on ploting

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.

Upvotes: 1

Views: 3833

Answers (1)

Chef1075
Chef1075

Reputation: 2724

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?

Upvotes: 1

Related Questions