MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / ipython_inline_display

Function ipython_inline_display

lib/matplotlib/backends/backend_webagg.py:300–320  ·  view source on GitHub ↗
(figure)

Source from the content-addressed store, hash-verified

298
299
300def ipython_inline_display(figure):
301 import tornado.template
302
303 WebAggApplication.initialize()
304 import asyncio
305 try:
306 asyncio.get_running_loop()
307 except RuntimeError:
308 if not webagg_server_thread.is_alive():
309 webagg_server_thread.start()
310
311 fignum = figure.number
312 tpl = Path(core.FigureManagerWebAgg.get_static_file_path(),
313 "ipython_inline_figure.html").read_text()
314 t = tornado.template.Template(tpl)
315 return t.generate(
316 prefix=WebAggApplication.url_prefix,
317 fig_id=fignum,
318 toolitems=core.NavigationToolbar2WebAgg.toolitems,
319 canvas=figure.canvas,
320 port=WebAggApplication.port).decode('utf-8')
321
322
323@_Backend.export

Callers

nothing calls this directly

Calls 4

PathClass · 0.85
initializeMethod · 0.80
get_static_file_pathMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…