MCPcopy Index your code
hub / github.com/bqplot/bqplot / close

Function close

bqplot/pyplot.py:175–196  ·  view source on GitHub ↗

Closes and unregister the context figure corresponding to the key. Parameters ---------- key: hashable Any variable that can be used as a key for a dictionary

(key)

Source from the content-addressed store, hash-verified

173
174
175def close(key):
176 """Closes and unregister the context figure corresponding to the key.
177
178 Parameters
179 ----------
180
181 key: hashable
182 Any variable that can be used as a key for a dictionary
183
184 """
185 figure_registry = _context['figure_registry']
186 if key not in figure_registry:
187 return
188 if _context['figure'] == figure_registry[key]:
189 figure()
190 fig = figure_registry[key]
191 if hasattr(fig, 'pyplot'):
192 fig.pyplot.close()
193 fig.pyplot_vbox.close()
194 fig.close()
195 del figure_registry[key]
196 del _context['scale_registry'][key]
197
198
199def _process_data(*kwarg_names):

Callers

nothing calls this directly

Calls 2

closeMethod · 0.80
figureFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…