Open lucasmsoares96 opened 1 year ago
Hi,
Thank you for reporting!
I can reproduce what you're seeing, and I think the reason for this is that when plotly is active xeus-octave produces an output with mimetype application/vnd.plotly.v1+json
, which is automatically rendered by jupyterlab without intervention from the kernel.
I don't know about Julia, but I tried Python, and I found out that when showing a graph it outputs a text/html
mimetype (in addition to the application/vnd.plotly.v1+json
) which contains a pre baked html representation (made by the kernel) of the plot (bundling the plotly.js library and other things, already minified).
Unfortunately, at the moment the same thing is quite complicated to do for xeus-octave, because it cannot easily handle all the plotly libraries and prepare an html representation inside the kernel, so we must rely on jupyterlab doing this work for us.
I have seen that when you export to HTML, the plot is saved as an image, so it is probable that the plotly extension that jupyterlab uses for rendering the plot also gets to decide what format to output when exporting the notebook, so it might be possible to achieve what you need by adding an html output at conversion, but this goes beyond my knowledge.
Do you at least have the image output?
First of all, you guys are doing an amazing job here.
xeus-octave version: octave 7.3.0 xeus-octave 0.1.0
Operating System: Debian
Description
I would like to export a notebook to HTML that contains a plot using
graphics_toolkit("plotly")
, but the plot does not appear in the generated HMTL. If you usegraphics_toolkit("notebook")
it works fine. For a Julia notebook the interactive graph is exported normally to HTML.What I Did
Then: File > Save and Export Notebook As... > HTML