Inkscape doesn't recongnise well text created in ggplot
289 views
Skip to first unread message
Roey Angel
unread,
Jan 16, 2015, 10:39:15 AM1/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Hi
I have issues with editing text of ggplots using Inkscape. Saving the plot as PDF (e.g. using ggsave() or cairo_pdf()), Inkscape shows a wrong font name for the text and a warning sign (which I take it to mean that the font was unidentified). The trouble is that if I try to change the font, the spaces between the letters are not preserved and words get uneven spacing between letters.
The result is that if I would like to change the text of some plots or the text properties I have to rewrite the text myself.
Saving as SVG causes text not be recognised as text and is therefore uneditable.
Has anyone encountered this before? Any solutions?
Thanks
Jonas K
unread,
Jan 16, 2015, 11:39:14 AM1/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Hi,
if you save the plot with the devSVG() function from the package RSvgDevice inkscape should recognise text as text. An then you can edit the text.
Best
Roey Angel
unread,
Jan 16, 2015, 12:04:59 PM1/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Works like a charm! Thanks
Roey Angel
unread,
Jan 16, 2015, 12:18:18 PM1/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
On a second thought using devSVG() seems to completely overrides font settings using theme_set() and convert all text to Sans, 13 regular, which is annoying in itself.
Is there a way for devSVG() to preserve the settings made in ggplot?
Jonas K
unread,
Jan 16, 2015, 12:54:48 PM1/16/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Unfortunately not, at least I am not aware of it.
I usually choose "Select all" under the "edit" tab (maybe the names are a little bit different, I don't know the english inkscape version) and then change the font.