fig-format for Notebook generated plots #6416
-
DescriptionHey I'm currently using a book structure to create a pdf that contains some jupyter notebooks. I would like to include the code generated plots as vector graphics (SVG or PDF). This is my structure
In my Untitled-1.qmd file i have the following plot, which gets included as desired (as a PDF).
Results
Plotting the same plot in my U2_EMS.ipynb results in a non vector graphic (probably .png). How can i change the fig-format for Notebooks? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need to ask Did you try setting PS: could you format properly your code? You need to enclose with more backticks than you have in the code, i.e., |
Beta Was this translation helpful? Give feedback.
No, I meant you have to specify the graphic device / backend, see https://matplotlib.org/stable/users/explain/backends.html.
This being said, this is mostly a Jupyter question rather than Quarto.
You could also export then display
To note, when running a Quarto document using the Jupyter kernel, the document is translated as a Jupyter Notebook.