How to size embedded figures in landscape #12859
Replies: 3 comments 12 replies
-
The figure dimension is defined by the document from which the figure comes from. |
Beta Was this translation helpful? Give feedback.
-
Ok, perhaps this is a problem with the docx format. I agree with the previous solution you provided when the figure is presented in portrait mode, but when I render my document that contains the embedded figure using the landscape notation, the figure must be manually resized to fill the landscape page in a word document. Note that I changed the dimensions of fig-width and fig-height below in your example to what I would expect the dimensions of the figure to be when printed on a landscape page. However, changing those values do not seem to affect the plot dimensions in landscape mode. ---
format: docx
---
::: landscape
{{< embed demo.qmd#fig-base-plot >}}
:::
---
format: html
engine: knitr
---
```{r}
#| label: fig-base-plot
#| fig-width: 9
#| fig-height: 5
plot(seq_len(5), c(1, 4, 9, 16, 25))
``` |
Beta Was this translation helpful? Give feedback.
-
In the above example, how would you align the figure with Figure 1 (left margin) in the landscape orientation then allow the figure to expand across the page to the right margin? This would allow the figure to fill the entire width of the page in landscape mode. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I don't know the correct options for how to size a figure embedded from another quarto document into a second quarto document to fill the page in landscape. I can resize the figure each time it is rendered, but I would like to know the code based approach to accomplish this task. I see different options in the documentation, but it is not clear to me when the figure is embedded.
There are two quarto documents below. The first contains code to create the example figure. The second is the document that renders the embedded figure.
Beta Was this translation helpful? Give feedback.
All reactions