SciView in PyCharm 2017.3 reduces functionality of Matplotlib
Hello!
Up until today's upgrade to PyCharm 2017.3, the default plot window when using Matplotlib included handy tools such as paning the view, zoom box, and accessing axes settings directly from the plot. In the new SciView window all of this is gone, and only a pretty reduced version of zooming remains where zooming defaults to the upper left corner, and the plot is not scaling anymore, but rather a pixelated image, so zooming also turns out to be quite useless in SciView.
Is there any way to disable the SciView window, and get back the old Matplotlib figure viewer? I know about the "Settings | Tools | Python Scientific | Show plots in toolwindow" checkbox, but unticking it just puts the plot into a window that is not interactive at all.
Is my main option here to just downgrade to the previous version I had? SciView ought to just be a plugin, bit I cannot find it the settings | plugins.
(Just to balance out this rather salty comment, I just want to say, for the record, that I am a faithful PyCharm devotee, and think the work you folks do is great!)
Cheers,
Jonas
Please sign in to leave a comment.
Hi Jonas! It's possible to disable SciView indeed, please uncheck Settings | Tools | Python Scientific | Show Plots in Toolwindow.
Hi everyone!
I'm experiencing the same problems as Jonas. Unticking the "toolwindow box" and/or unticking "scientific mode" does not help. Only a rastered version of the plots is displayed in the sciview-window.
Is there any solution to this?
Best regards!
Hello, Pavel,
as I mentioned directly in my original question, I had already tried the "Show plots in toolwindow" unchecking trick, and was left unsatisfied. To me it seems what I need (and presumably what Phillip needs as well) is some way of disabling the SciView plugin altogether, or at least modify how it interacts with matplotlib.
So the question is just that; how to get SciView to not interfere with a plot as produced by matplotlib?
Regards,
Jonas
Apparently the previous comments are not getting through to JetBrains' so let me try this:
HEY JETBRAINS, WHY DID YOU KILL MATPLOTLIB? DISABLE YOUR CRIPPLED SO-CALLED 'SCIVIEW' SO THAT WE CAN ZOOM IN ON OUR PLOTS!
They are OUR plots, not yours.
Oh, I'm sorry Jonas, I missed your note about this setting. Could you please specify what OS and matplotlib backend are you using?
Hello, Pavel,
I am running Windows 7, and Python 3.5.1 (standard Anaconda install).
With the lines
import matplotlib
print(matplotlib.get_backend())
I get printed:
module://backend_interagg
I've never heard of an interagg backend, though agg is familiar, so perhaps it is just the way it is written.
Cheers,
Jonas
Thank you, does manual backend setup to TkAgg, Qt4Agg or Qt5Agg fixes the problem?
Could you please check what backend is selected inside matplotlibrc? The file can be found with
Yes! Thank you! Manually setting the back-end does the trick for me. I'm using python3.5.2 on ubuntu16.04 and it works for pyqt5 ("Qt5Agg") and tkinter("TkAgg").
Best regards,
Philipp
P.S. In general I like the idea of a more integrated "matlab-like" plotting tool, however currently the viewer lacks some features already provided by the normal matplotlib-plots. Nevertheless pycharm is the best python ide I've tested so far, so keep going!
Thank you, Pavel!
Qt5Agg did the trick! Note that the Settings | Tools | Python Scientific | Show Plots in Toolwindow - box has to be unticked to kick me back into the usual matplotlib figure window (with zoombox, axes access, etc.).
TkAgg does NOT work for me (Win 7, Python 3.5.1), and only gives me the raterized plot without any sort of controls at all.
If I find the time, I'll try to play with some other backends, to see what works. But performance is pretty much as expected with Qt5Agg (it takes maybe a second longer to render the figure on screen than with whatever backend is default, which I am not really worried about - the figures in question are moderately complex anyway, and take time to plt.show() no matter what).
Cheers,
Jonas
P.S. I share Philipp's sentiment entirely; keep up t he good work, PyCharm!
Pavel's initial suggestion worked form me immediately on Linux w/default backend whatever that is
In[3]: mpl.get_backend()
Out[3]: 'module://backend_interagg'
. Thanks.
Show Plots in Toolwindow needs to be disabled for every new project however, please add a default option.
+1 on @Oystestu's request to have an option to disable Show Plots in Toolwindow by default. I like the idea of showing all plots in SciView, but until it has the same feature set as "standard" Matplotlib windows (Qt5Agg in my case) it is not a viable replacement.
I'm testing 2018.1 and I can't get any plots to work with Scientific Mode on, using cells. Does anyone have it working?
I always have to disable the scientific view, it's so frustrating. Wish it was disabled by default.
I could never make this solution work on a remote raspberry. I have the common error :
"ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running"
I tried to restart my kernels, install qt, etc. but couldn't make it work, i guess i'll have to forget the idea of comparing values directly from a plot :(
Anyway, i would like to confirm what was said before : thanks for the amazing job you guys ve done on PyCharm, everything is perfect but this scientific view which is quite a failure.
From the shop i expected some advanced features allowing me to configure a dashboard more easily than matplotlib, but it just transforms a usefull vectorial image into a low quality image...
Anyway, keep on with your amazing work and lets hope that some new features improving the scientific mode will come soon !
This seems to STILL not be fixed.
I'm supposed to recommend PyCharm Professional to our company next week, but this makes it very difficult. SciView is more of a hindrance than a help.
I had a similar issue with PyCharm 2020.2 Professional, Mac OS X system (Catalina 10.15.7), where I could not get a Matplotlib plot window to appear outside of SciView. I didn't have this problem with an older version of PyCharm on a past machine.
My Fix: Was not a MPL backend issue, but an issue with executing "interactive" scripts via the Terminal. In the Run settings, enabling "Edit Configuration>Execution>Run with Python Console" solved the problem.
I am relatively new to PyCharm, but I think the MPL window is automatically closed at the end of executing a script from the Terminal, whereas the Python Console will switch to interactive mode and hold the plot window open.
>I could not get a Matplotlib plot window to appear outside of SciView
Even after disabling [Preferences | Tools | Python Scientific | Show plots in tool window] ?
Yes, even with the setting disabled. I tried toggling and restarting PyCharm several times.
When executing a script via a Terminal, I observe a Python application window flash briefly in the OS taskbar and then disappear. Executing via a Python Console returns a message that “interactive mode” is enabled and the window stays open without issue.
How can I get the plots in SciView to render in SVG file format instead of 800 x 600 PNG?
The backend above didn't work for me. This works for me (pycharm professional 2020/03)
Unfortunately the trick only allows me to plot once in each jupyter server run, after closing the window I can't plot again unless restart the server...
Hello ep47,
Could you please submit a issue
https://youtrack.jetbrains.com/issues/PY with logs folder zipped from ***Help | Collect logs and Diagnostic Data*** and code example attached?
Thank you!
Hello Manojbaishya,
Regrettably, it is not supported.
please submit a feature request at https://youtrack.jetbrains.com/issues/PY
Information on how to use YouTrack: https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications
Hello Han Chen,
>Unfortunately the trick only allows me to plot once in each jupyter server run, after closing the window I can't plot again unless restart the server...
Do you mean the plot does not appear in the preview? I could not reproduce this. Please provides me with a simplified code example and Python version. Thank you!
For me
fixed this issue on MacOSX. The plot now shows up in SciView sidebar.