When displaying DataFrames in a Jupyter notebook they are nicely rendered using html. When you export the notebook to latex they are nicely exported as latex code creating that table.
Is it possible to have the same functionality for plots created with PGFPlots.jl or PGFPlotsX.jl? Meaning if I export a jupyter notebook to latex I would get a latex document that uses a the pgf code to display the plot instead of including an svg or pdf image of it.
I’m not sure in which package (IJulia, ipython, nbconvert, Plots.jl, PGFPlots(X).jl or a combination of those) this would have to be implemented.
Yes, displaying the plots in a notebook works all fine. And converting the notebook to latex with for example jupyter-nbconvert --to latex mynotebook.ipynb works also fine.
However the plots are included as images (pdf or svg) in the generated latex document. I wonder if it would be possible for them to be automatically included as pgf plots/tikz code instead. Similar to how it already happens with tables.
However in the notebook itself it is now also only displayed as the latex source . Is there some priority list that IJulia uses to decide which show method to use?
I am not quite sure you would want this, even if it was implemented.
While rendering math is now really fast with MathJaX (and even better with KaTeX), pgfplots is comparatively expensive, even with engines like LuaTeX, and uses a lot of TeX functionality and special backengs (via TikZ/pgf). One would essentially have to implement a rather complete TeX engine in the browser.