Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add an (SVG-) image to an existing graph in R

I'd like to an an image (ideally an SVG) as an inset to an existing graph in R and put a black border around the image.

Is that possible with base-functions in R? Do I need packages for that?

like image 273
R_User Avatar asked Feb 22 '13 07:02

R_User


2 Answers

Maybe the grImport package is what you are looking for ? It only seems to allow to import Posctscript files, however.

You can find two vignettes files on the package web page, which should help you learn how to use it.

like image 167
juba Avatar answered Nov 07 '22 18:11

juba


Convert your SVG to PostScript, then you can do all this good stuff:

http://www.stat.auckland.ac.nz/~paul/Talks/import.pdf

If there's an easier way to convert from SVG to the RGML format mentioned there, that would be a better option.

like image 30
Spacedman Avatar answered Nov 07 '22 18:11

Spacedman