-
-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for pdf plot output #1035
Comments
Ok, so based on the above linked PRs, the suggested changes in this issue work to fix it, example here: https://jeremiahpslewis.github.io/quarto-reproducible-gh-actions/quarto-and-github-actions.pdf Codebase: https://github.com/jeremiahpslewis/quarto-reproducible-gh-actions |
Once this lands we still might need to change Quarto to stop "redirecting" pdf to png here: https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/jupyter/lang/julia/setup.jl#L22-L27 Further, we might want some sort of version check to make sure that we use the workaround when updated IJulia isn't avaialble. |
Ooh, good that you mention a workaround for earlier versions of IJulia (once/if PR is merged). I wanted to suggest a slightly different approach: what about a Quarto.jl package which bundles the logic which is currently in the setup.jl file, requires a couple of packages (Plots, IJulia), and sets a lower bound on the packages based on PDF support (and other things as they may come up in the future). |
I think we need to keep the code in |
I think this can be closed, see discussion here: #1038 |
This PR to quarto will (when ready) resolve this issue quarto-dev/quarto-cli#800 |
Hi there, we've been putting some work into integrating support for IJulia into Quarto (https://quarto.org), which is a scientific publishing system based on Pandoc (sort of like R Markdown, in fact built by the same team, but fundamentally cross-language and cross-engine).
We have plots working correctly w/ various output formats, but one noteworthy limitation is that when creating a PDF the plot output is provided as PNG (as SVG currently doesn't work out of the box w/ LaTeX). As you can imagine this results in dramatically lower quality than is possible with native PDF plot output. One of Quarto's main uses cases is creation of scientific publications for academic journals, so getting high quality output ends up being pretty important.
I see the available output formats in IJulia enumerated here:
IJulia.jl/src/display.jl
Lines 19 to 28 in cc2a9bf
Further, I noted the place where JuliaPlots is yielding output here:
https://github.com/JuliaPlots/Plots.jl/blob/master/src/ijulia.jl#L33-L56
It would be fantastic if these could be updated to produce PDF output. This might not at first blush seem to make sense for a "notebook" but if you think of Jupyter as an execution engine for realizing executable code into output it makes more sense (i.e. think about
nbconvert
as the client rather than the traditional browser front end). This does in fact currently work for Matplotlib output on the Python side.It's certainly a fine stopgap to use PNG output for plots in PDFs, but my guess is that when users start creating articles they want to submit for publication that the PDF support will quickly go from nice-to-have to must have.
The text was updated successfully, but these errors were encountered: