Unable to use mathplotlib in scientific mode
Answered
Hi,
I am not sure if I have missed anything. I have just installed PyCharm 2017.3 today and when I import mathplotlib, and do plt.show() in my python console, nothing happened.
The instruction below said that graph should be plotted in the SciView box:
https://www.jetbrains.com/help/pycharm/scientific-mode-support.html
I need help to get this work.
Best,
Louis
Please sign in to leave a comment.
Hi Louis8799! Do you have Settings | Tools | Python Scientific | Show plots in toolwindow option enabled?
Hi Pavel, I'm having a similar issue. I have Scientific Mode turned on and "Show plots in toolwindow" enabled but the plot does not appear in the SciView window. Thanks.
Hi Pavel and Eric,
I restarted PyCharm and it works........
no idea at all.
+1 on having this issue. Did this ever get resolved? I have the same issue and I'm just wondering if there was more to the setup than simply installing pycharm. Is there an additional setting that needs to be set?
I upgraded from Pycharm community to professional to have this type of functionality and it just doesnt work. Nothing in shown in the "Sciview" plots. Plots just appear in a separate window. I have scientific mode enabled and "Settings | Tools | Python Scientific | Show plots in toolwindow" enabled. I tried this with the sample plotting code on the Pycharm help page as well.
The "Data" viewer also seems broken: dataframes with quotes on the column headers cannot be plotted.
I find this a bit dissapointing for "professional" and have reverted back to the "community" edition despite the license i bought.
I'm also having issues with this,
I've made sure to check the "show plots in toolwindow" setting but am still getting plots in separate windows
Same problem. Checked "Show plot in toolwindow" still plot window popping out.
I had the same issue, I'm on PyCharm Professional 2018.1 trial, here is what solved it for me:
Then I could run the sample code on the Scientific Mode Tutorial help page and it showed the 2 plots in the SciView toolbar as it should.
Hope this helps.
Pycharm scientific works in Ubuntu but doesn't work in windows 10. And why would you use "JetBrain Toolbox" just for installing PyCharm?
I have the same issue. Plot window keeps popping up as floating, even when I have show plots in tool window set. Windows 10. Just uninstalled and reinstalled pycharm. Didn't help. Running Anaconda.
Hi Andrew, could you please specify PyCharm version you are using?
2018.1.4. (Re)Installed it yesterday from latest download.
And it's the commercial version.
same problem with 2018.1.2 professionnial on Mac OS 10.11.6.
I can't get any plot, with our without ticking the box in tools.
thanks
Walter, do you use a remote interpreter? Please file a ticket in our bug tracker: https://youtrack.jetbrains.com/issues/PY
Andrew, I created a separate issue for your problem: PY-30454. Could you please take a screenshot of the plot popup and attach it there? Also please specify matplotlib version you are using.
On windows 10 it's always matplotlib popup window, irrespective of what you select/deselect in settings. This issue is never resolved since I put up comment in April.
@Paveil yes indeed I have figured out that it is only with a remote (Docker for instance) interpreter. Do I have to create a ticket ? Is it something that should work ?
thanks
@Walter, unfortunately, docker is not supported with matplotlib, the relevant comment: https://youtrack.jetbrains.com/issue/PY-18102#focus=streamItem-27-1412306-0-0
@Sanjeev, I reproduced it finally, looks like it works ok on the pure virtualenv, but fails on Anaconda. We'll take a look on the cause. I am sorry it took so long.
@Pavel, will be happy to see it working with Anaconda on win10, all nicely stacked plot windows within pycharm!. That's what i use at work.!
I was able to plot matplotlib in sciview from a remote python intepreter with a workaround described here: https://youtrack.jetbrains.com/issue/PY-27489
I am running with a remote interpreter and cannot get any plots, no matter what I do. Needless to say, plotting is required in my python runs. My workaround is to login to the remote via a shell terminal and run manually when I want a plot.
Ridiculous. Is there an ETA on when plotting will be supported by Pycharm?
BTW: I would prefer a full plot window rather than sciview as the plots are much better without sciview (e.g. I can ZOOM).
@Petewills
Plots should already work with remote interpreter without additional configuration. I tested with Windows 10 as a client and Ubuntu 18.04 as server, the plots showed right away.
We do have a few issues opened with plots on remote interpreters:
https://youtrack.jetbrains.com/issue/PY-33052
https://youtrack.jetbrains.com/issue/PY-32668
https://youtrack.jetbrains.com/issue/PY-32178
Please check if your case is related to any of them, and try the workarounds from there. If this is not helpful, I would suggest to submit a support request, and we would gladly investigate your case.
https://intellij-support.jetbrains.com/hc/en-us/?pycharm
@Petewills did you find a solution to this? I have the same issue with the remote server. Also agree with the wanting a full plot window!
I am able to plot now but I got it working a while back so it is fuzzy.
I do not use scientific mode - I think I disabled it in the settings but it keeps trying to come back - I don't let it.
Now, when running remotely, I simply use matplotlib commands and they run on the remote and display a window on my local machine. It gives normal matplotlib graphics.
Hi,
In my case also, No plot is drawn with plt.show(). Can anybody please help !
Code Used:
Are the plots in SciView enabled in [File | Settings | Tools | Python Scientific]?
Andrey Resler
Yes, 'Show plots in tool window' is 'ticked' (selected).
I'll revoke my payment for the Professional version. SciView does not work, simply.