emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* TIP: use svglite as device in for producing plots in R/ESS code blocks
@ 2022-11-03 17:49 Cook, Malcolm
  0 siblings, 0 replies; only message in thread
From: Cook, Malcolm @ 2022-11-03 17:49 UTC (permalink / raw)
  To: Org-mode

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:


...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 😉


Malcolm Cook

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-03 17:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-03 17:49 TIP: use svglite as device in for producing plots in R/ESS code blocks Cook, Malcolm

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).