Back to Blog
Pycharm community matplotlib7/13/2023 ![]() Assume, however, that I find the "bells and whistles" of P圜harm appealing enough that I would really like to use it as my IDE, but want to be able to examine plots without having to go through the plt.savefig() hassle (since I don't want to have to keep every plot I attempt). One answer is that I should just do my plotting using these methods and ignore P圜harm. Indeed, I can even use the terminal through P圜harm and get the desired plot. I have use the same process through both a python and ipython console in a generic terminal session, and even through emacs, and in all cases the plot appears on calling the plt.plot() line. ![]() Note that P圜harm has set interactive mode on, and that it has recognized that my backend is (should be?) MacOS. Not only does a figure get saved with that name, the plot appears in the Figure 1 window. However, if I then do: In: plt.savefig('foo.png') ![]() At this point, I can try In: plt.show()īut still no plot appears. However, no plot appears, and the mouse switches to the SPOD when hovering over it (I'm on a Mac). This will open a window with the label "Figure 1". Here's an exmaple process that fails in P圜harm: In: import matplotlib.pyplot as pltīackend MacOSX is interactive backend. However, this does not happen when I attempt to plot from outside P圜harm. When I use P圜harm and ipython as the console through which commands are interpreted, plots do not show up until I save the figure. I have an issue with P圜harm and matplotlib that I cannot seem to correct.
0 Comments
Read More
Leave a Reply. |