Problems with plotting

Hi there,

running a very simple script, which does not plot as it should (but works from the command line).

Any suggestions:

import numpy as np
import matplotlib.pyplot as plt

x = np.arange(0, 5, 0.1)
y = np.sin(x)
plt.plot(x, y)

2 comments
Comment actions Permalink

Hi Felix,

I don't have a solution to your problem as this seems to have to do with the event loop of matplotlib intefering with the one of PyCharm. There might be an additional issue with the so-called backends.

To get an impression of what I mean, refer to http://matplotlib.sourceforge.net/users/shell.html and http://www.wingware.com/doc/howtos/matplotlib. The latter clearly shows that the IDE developers (in this case of Wing IDE) had to interfer with the matplotlib event loop to make plotting work within the IDE. PyCharm's and matplotlib's event loops seem to lock up.

By the way, Komodo (by ActiveState) seems to have the same problem (http://community.activestate.com/node/6807).

You might want to file an issue in http://youtrack.jetbrains.net/issues/PY.

Regards

Volker

0
Comment actions Permalink

Hello, 

I'm having this problem right now. 
Did it get fixed or not ? 

Can anyone help me ? 

 

Thank you 

0

Please sign in to leave a comment.