You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ MPLBACKEND=tkagg ipython --profile=null
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
Type "copyright", "credits" or "license" for more information.
IPython 5.2.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
IPython profile: null
In [1]: %matplotlib
Using matplotlib backend: Qt5Agg
Ideally %matplotlib would respect MPLBACKEND.
It appears that the problem happens in pylabtools.find_gui_and_backend, namely
# We need to read the backend from the original data structure, *not*
# from mpl.rcParams, since a prior invocation of %matplotlib may have
# overwritten that.
# WARNING: this assumes matplotlib 1.1 or newer!!
backend = matplotlib.rcParamsOrig['backend'] ### <- oops
The correct backend can be obtained from matplotlib as matplotlib.get_backend() instead.
The text was updated successfully, but these errors were encountered:
@tacaswell can you comment on what we should be doing here? The suggested solution appears to be equivalent to what the comment just above that line says we're deliberately not doing, but I don't really understand the implications.
which would be the obvious solution. IPython appears to select the right backend when calling %matplotlib, but the raised window freezes, which suggests to me that something is wrong with the event loop in that case
(null is an empty profile)
Ideally
%matplotlib
would respectMPLBACKEND
.It appears that the problem happens in
pylabtools.find_gui_and_backend
, namelyThe correct backend can be obtained from matplotlib as
matplotlib.get_backend()
instead.The text was updated successfully, but these errors were encountered: