PlotlyJS.jl icon indicating copy to clipboard operation
PlotlyJS.jl copied to clipboard

Fix modifying(!) functions not updating SyncPlots in Jupyter

Open halleysfifthinc opened this issue 1 year ago • 0 comments

This PR depends on JuliaGizmos/WebIO.jl #497 and/or JuliaGizmos/WebIO.jl #498.

For a while now, plot modifying functions (e.g. add_vline!, etc) did not actually update the existing plot in Jupyter, and the plot needed to be redisplayed to see any changes.

I discover that the plotly mime type appears to have a higher precedence in Jupyter (unclear if this is due to the jupyterlab-plotly extension or something in IJulia), and that the definition of an IJulia.display_dict method also interfered with rendering the WebIO scope (and instead resulted in the [false] default warning that WebIO was not detected, when it is in fact correctly installed and detected/functioning).

Without my WebIO PR's, plots won't update yet in Jupyter, but the WebIO rendered scope is now showing properly, and the other mime types are still present in the notebook/cell outputs "data" field (in order, `["application/vnd.webio.node+json", "image/png", "image/svg+xml", "text/html", "text/plain"]).

halleysfifthinc avatar Oct 31 '22 17:10 halleysfifthinc