Использование графиков RGL в Quarto: HTML и PDFHtml

Программисты Html
Anonymous
Использование графиков RGL в Quarto: HTML и PDF

Сообщение Anonymous »

В книгу, которую я пишу, используя Quarto, я хотел бы включить версии rgl и создать версии HTML (динамика) и PDF (статический), где графики выглядят более или менее одинаковыми.

Код: Выделить всё

---
title: "Test use of rgl in PDF & HTML"
format:
html:
toc: false
pdf:
toc: false
---

```{r}
#| label: setup
#| include: false
library(rgl)
options(rgl.useNULL = TRUE) # Suppress the separate rgl window during knitting
```

::: {.content-visible when-format="pdf"}

PDF: Will this generate a static plot in @fig-rgl-test-pdf?

```{r}
#| label: fig-rgl-test-pdf
#| dev: pdf
#| fig-width: 8
#| fig-height: 8
#| fig-cap: "Random points in 3D"
x 

Подробнее здесь: [url]https://stackoverflow.com/questions/79767482/using-rgl-plots-in-quarto-html-and-pdf[/url]

Вернуться в «Html»