@@ -50,9 +50,9 @@ Globally Managed Figures
5050========================
5151
5252
53- The `mpl_gui.registry ` module provides a direct analogy to the
53+ The `mpl_gui.global_figures ` module provides a direct analogy to the
5454`matplotlib.pyplot ` behavior of having a global registry of figures. Thus, any
55- figures created via the functions in `.registry ` will remain alive until they
55+ figures created via the functions in `.global_figures ` will remain alive until they
5656have been cleared from the registry (and the user has dropped all other
5757references). While it can be convenient, it carries with it the risk inherent
5858in any use of global state.
@@ -61,23 +61,23 @@ The `matplotlib.pyplot` API related to figure creation, showing, and closing is
6161
6262::
6363
64- import mpl_gui.registry as reg
64+ import mpl_gui.global_figures as gfigs
6565
66- fig = reg .figure()
67- fig, ax = reg .subplots()
68- fig, axd = reg .subplot_mosaic('AA\nCD')
66+ fig = gfigs .figure()
67+ fig, ax = gfigs .subplots()
68+ fig, axd = gfigs .subplot_mosaic('AA\nCD')
6969
70- reg .show(block=True) # blocks until all figures are closed
71- reg .show(block=True, timeout=1000) # blocks for up to 1s or all figures are closed
72- reg .show(block=False) # does not block
73- reg .show() # depends on if in "interacitve mode"
70+ gfigs .show(block=True) # blocks until all figures are closed
71+ gfigs .show(block=True, timeout=1000) # blocks for up to 1s or all figures are closed
72+ gfigs .show(block=False) # does not block
73+ gfigs .show() # depends on if in "interacitve mode"
7474
75- reg .ion() # turn on interactive mode
76- reg .ioff() # turn off interactive mode
77- reg .is_interactive() # query interactive state
75+ gfigs .ion() # turn on interactive mode
76+ gfigs .ioff() # turn off interactive mode
77+ gfigs .is_interactive() # query interactive state
7878
79- reg .close('all') # close all open figures
80- reg .close(fig) # close a particular figure
79+ gfigs .close('all') # close all open figures
80+ gfigs .close(fig) # close a particular figure
8181
8282
8383
@@ -146,7 +146,7 @@ This will create 3 figures and block on ``__exit__``. The blocking
146146behavior depends on `~mpl_gui.is_interactive() ` (and follow the behavior of
147147`.display ` and `.FigureRegistry.show ` can explicitly controlled via the *block * keyword argument).
148148
149- The `.registry ` module is implemented by having a singleton `.FigureRegistry `
149+ The `.global_figures ` module is implemented by having a singleton `.FigureRegistry `
150150at the module level.
151151
152152
0 commit comments