Replies: 2 comments 3 replies
-
You currently cannot, at least not easily. You need the original plot to have been rendered in a single resolution, from which you can embed. This is a generally very hard problem to solve, because embedding the plot while changing the resolution would involve detecting the code that caused the plot to be generated (and its dependencies), and re-running the code while changing the specific resolution settings. We're aware of this limitation but there's no clear technical solution for this that we can deliver. |
Beta Was this translation helpful? Give feedback.
-
I wanted to add, that I do think this difference is related to how rendering from a .qmd works for embed feature. This embed feature was designed for notebooks initially, and works through Jupyter by getting the cell result in the rendered notebook. If you use We have some related issue about this like this one (and others linked in it) Probably if you use We know we need to make some improvement to this intermediate ipynb rendering to make consistent default and other improvment, especially when .qmd uses knitr engine. |
Beta Was this translation helpful? Give feedback.
-
Description
In a manuscript project, I tried to generate a plot in the
index.qmd
from two ways:index.qmd
fileembed
to include the same code chunk from anotherqmd
fileI found that the one generated from the
embed
shortcode has a much lower resolution than the original. I tried to set upfig-width
orfig-dpi
in theyaml
header, it does not seem to have an effect.To reproduce:
Use the official manuscript template https://github.com/quarto-ext/manuscript-template-vscode.git
render the
index.qmd
file, the following plot is generated:In the
index.qmd
file, replace the shortcode{{< embed notebooks/explore-earthquakes.qmd#fig-spatial-plot >}} with the code directly (note that we need to change the path for the source csv file):
index.qmd
again, a new plot is generated.Beta Was this translation helpful? Give feedback.
All reactions