File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,13 @@ ProPlot v0.3.0 (2020-01-##)
6060 with a default ``.proplotrc `` file, change the auto-generated user ``.proplotrc ``
6161 (:pr: `50 `).
6262
63+ ProPlot v0.3.1 (2019-12-XX)
64+ ===========================
65+ .. rubric :: Bug fixes
66+
67+ - Repair issue with latest versions of matplotlib where ``%matplotlib inline ``
68+ fails *silently * so the backend is not instantiated.
69+
6370ProPlot v0.3.0 (2019-12-15)
6471===========================
6572.. rubric :: Deprecated
Original file line number Diff line number Diff line change @@ -911,20 +911,21 @@ def ipython_matplotlib(backend=None, fmt=None):
911911 return
912912
913913 # For notebooks
914+ # WARNING: Latest version of matplotlib does not raise error when
915+ # https://stackoverflow.com/a/22424821/4970632
914916 rc ._init = False
915- ibackend = ('inline' if backend == 'auto' else backend )
917+ ibackend = backend
918+ if backend == 'auto' :
919+ if 'IPKernelApp' in getattr (get_ipython (), 'config' , '' ):
920+ ibackend = 'inline'
921+ else :
922+ ibackend = 'qt'
916923 try :
917924 ipython .magic ('matplotlib ' + ibackend )
918925 rc .reset ()
919- # For terminals (UnknownBackend is subclass of KeyError)
920926 except KeyError :
921927 if backend != 'auto' :
922928 _warn_proplot (f'{ "%matplotlib " + backend !r} failed.' )
923- try :
924- ipython .magic ('matplotlib qt' ) # use any available Qt backend
925- rc .reset ()
926- except KeyError :
927- pass # should be impossible, matplotlib needs Qt!
928929
929930 # Configure inline backend no matter what type of session this is
930931 # Should be silently ignored for terminal ipython sessions
@@ -1037,4 +1038,4 @@ def use_font(font=None):
10371038ipython_matplotlib ()
10381039ipython_autoreload ()
10391040ipython_autosave ()
1040- use_font ()
1041+ # use_font()
You can’t perform that action at this time.
0 commit comments