Hi everybody :) I use R to plot things in svg format. One of the things is text, of course. I noticed that text() in svg() gets saved as path, which is unacceptable for my purposes. (Interestingly, text() in cairo_pdf() gets saved as text.) Is there a way to save text as text in svg? And paths also is what I plot a lot. I know there is segments(), which plots disconnected segments, and things like polypath(), which create closed paths (and subpaths). These are all very useful, but is there a function to draw a multi-segment path without closing it? That is, without connecting the last vertex to the first one? Thanks! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 901 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130313/24001abc/attachment.bin>
2 questions about svg output
3 messages · Paul Murrell, Ivan Zaigralin
Hi
On 14/03/13 09:52, Ivan Zaigralin wrote:
Hi everybody :) I use R to plot things in svg format. One of the things is text, of course. I noticed that text() in svg() gets saved as path, which is unacceptable for my purposes. (Interestingly, text() in cairo_pdf() gets saved as text.) Is there a way to save text as text in svg?
You could try the 'gridSVG' package, but that will only work if your graphics are grid/lattice/ggplot2.
And paths also is what I plot a lot. I know there is segments(), which plots disconnected segments, and things like polypath(), which create closed paths (and subpaths). These are all very useful, but is there a function to draw a multi-segment path without closing it? That is, without connecting the last vertex to the first one?
Try lines() (or grid.lines()) Paul
Thanks!
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Dr Paul Murrell Department of Statistics The University of Auckland Private Bag 92019 Auckland New Zealand 64 9 3737599 x85392 paul at stat.auckland.ac.nz http://www.stat.auckland.ac.nz/~paul/
On 03/13/2013 05:16 PM, Paul Murrell wrote:
On 14/03/13 09:52, Ivan Zaigralin wrote:
I use R to plot things in svg format. One of the things is text, of course. I noticed that text() in svg() gets saved as path, which is unacceptable for my purposes. (Interestingly, text() in cairo_pdf() gets saved as text.) Is there a way to save text as text in svg?
You could try the 'gridSVG' package, but that will only work if your graphics are grid/lattice/ggplot2.
Thanks, it works. But I have to give up drawing functions like barplot() and pie()?
And paths also is what I plot a lot. I know there is segments(), which plots disconnected segments, and things like polypath(), which create closed paths (and subpaths). These are all very useful, but is there a function to draw a multi-segment path without closing it? That is, without connecting the last vertex to the first one?
Try lines() (or grid.lines())
Perfect, thanks. P.S.: Paul, sorry for extra copy. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 901 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130313/fcb12b97/attachment.bin>