[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TIP: use svglite as device in for producing plots in R/ESS code blocks
From: |
Cook, Malcolm |
Subject: |
TIP: use svglite as device in for producing plots in R/ESS code blocks |
Date: |
Thu, 3 Nov 2022 17:49:19 +0000 |
I wanted to use svglite as the driver for producing .svg plots within org.
It took a little poking around but the solution was one line:
```
(setf (alist-get :svg org-babel-R-graphics-devices ) '("svglite" "file"))
```
Of course it requires:
```
library(svglite)
```
...to have been called in the R session.
This greatly simplifies using org to author graphics heavy literate programming
/ exploratory data analyses, especially in combination with
-
https://emacs.stackexchange.com/questions/29871/how-to-embed-svg-output-of-org-mode-src-block-as-inline-svg-in-html-export
- building emacs with svg support
I mention this TIP in case anyone else is similarly inclined, and in case they
have additional TIPs that similarly improve working with org/ESS/R/svg
Oh, and, you can set it back with:
```
(setf (alist-get :svg org-babel-R-graphics-devices ) '("svg" "file"))
```
... and there is probably some juju to make it buffer local 😉
Cheers,
Malcolm Cook
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- TIP: use svglite as device in for producing plots in R/ESS code blocks,
Cook, Malcolm <=