(figure)
| 298 | |
| 299 | |
| 300 | def 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…