File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 "GeoJSON" ,
4747 "Javascript" ,
4848 "Image" ,
49- "set_matplotlib_close" ,
5049 "Video" ,
5150]
5251
@@ -1265,44 +1264,3 @@ def _repr_html_(self):
12651264 def reload (self ):
12661265 # TODO
12671266 pass
1268-
1269-
1270- @skip_doctest
1271- def set_matplotlib_close (close = True ):
1272- """
1273- .. deprecated:: 7.23
1274-
1275- use `matplotlib_inline.backend_inline.set_matplotlib_close()`
1276-
1277- Set whether the inline backend closes all figures automatically or not.
1278-
1279- By default, the inline backend used in the IPython Notebook will close all
1280- matplotlib figures automatically after each cell is run. This means that
1281- plots in different cells won't interfere. Sometimes, you may want to make
1282- a plot in one cell and then refine it in later cells. This can be accomplished
1283- by::
1284-
1285- In [1]: set_matplotlib_close(False)
1286-
1287- To set this in your config files use the following::
1288-
1289- c.InlineBackend.close_figures = False
1290-
1291- Parameters
1292- ----------
1293- close : bool
1294- Should all matplotlib figures be automatically closed after each cell is
1295- run?
1296- """
1297- warnings .warn (
1298- "`set_matplotlib_close` is deprecated since IPython 7.23, directly "
1299- "use `matplotlib_inline.backend_inline.set_matplotlib_close()`" ,
1300- DeprecationWarning ,
1301- stacklevel = 2 ,
1302- )
1303-
1304- from matplotlib_inline .backend_inline import (
1305- set_matplotlib_close as set_matplotlib_close_orig ,
1306- )
1307-
1308- set_matplotlib_close_orig (close )
Original file line number Diff line number Diff line change @@ -158,13 +158,13 @@ def _get_inline_config():
158158
159159@dec .skip_without ("matplotlib" )
160160def test_set_matplotlib_close ():
161+ from matplotlib_inline .backend_inline import set_matplotlib_close
161162 cfg = _get_inline_config ()
162163 cfg .close_figures = False
163- with pytest . deprecated_call ():
164- display . set_matplotlib_close ()
164+
165+ set_matplotlib_close ()
165166 assert cfg .close_figures
166- with pytest .deprecated_call ():
167- display .set_matplotlib_close (False )
167+ set_matplotlib_close (False )
168168 assert not cfg .close_figures
169169
170170_fmt_mime_map = {
Original file line number Diff line number Diff line change 3737 GeoJSON as GeoJSON ,
3838 Javascript as Javascript ,
3939 Image as Image ,
40- set_matplotlib_close as set_matplotlib_close ,
4140 Video as Video ,
4241)
4342from IPython .lib .display import *
You can’t perform that action at this time.
0 commit comments