Exporting plots to .svg with editable labels

69 views
Skip to first unread message

Roey Angel

unread,
Sep 19, 2012, 10:26:48 AM9/19/12
to ggp...@googlegroups.com
Hi,
I'm not sure if this is a general problem or not, but at least on my system (kubuntu 12.04) if I export plots to .svg I cannot edit the text in Inkscape.
Text is only editable if I export it to .pdf, but then some symbols aren't exported correctly and I get X instead.
My workaround till now is to export in both formats and then copy/ paste the text from the .pdf onto the .svg figure.

I'm guessing there's some way to solve this.

Thanks
Roey

Winston Chang

unread,
Sep 19, 2012, 10:35:03 AM9/19/12
to Roey Angel, ggp...@googlegroups.com
When you call svg() or ggsave(), try adding the option
useDingbats=FALSE. By default, R uses the Dingbats font for point
symbols, and this can sometimes cause problems.

It's also possible that making the Dingbats font available to Inkscape
will solve the issue, but I haven't tested this.

-Winston
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email ggp...@googlegroups.com
> To unsubscribe: email ggplot2+u...@googlegroups.com
> More options: http://groups.google.com/group/ggplot2

Roey Angel

unread,
Sep 19, 2012, 11:16:37 AM9/19/12
to ggp...@googlegroups.com, Roey Angel
Hi Winston,
Thanks for the quick reply.
However, I do have Dingbats available for Inkscape, and also apparently the option useDingbats is not available for svg(). It is available for PDF but as I said my problem with PDF isn't the text but the fact that some shapes aren't exported correctly (particularly circles, I think).

When I export to .svg I get the labels as vector shapes which Inkscape doesn't recognise as text.

Roey
Reply all
Reply to author
Forward
0 new messages