Letter "q" imported instead of a circle plot symbol in PDF import
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When importing PDF files of scientific plots generated from R (www.r-
Inkscape version tested: Inkscape 0.46-pre1
OS: Windows XP
To test, please see the attached example files. Initially I wasn't sure how to attach the files so I also placed a temporary link to the example PDF files. The linked files will be removed at some point in the future.
http://
http://
http://
Hope this can be easily fixed because it is major showstopper for many people, who use R and wish to make better use of Inkscape for plot annotation etc.
Regards,
TL
P.S. In case anyone is interested, to generate the files from scratch you would need R (www.r-project.org) installed and run the following:
---------<R code start>-
# plot 1
pdf(file="bugreport-1.pdf", onefile = FALSE, paper="a4", width = 18/2.54, height = 12/2.54)
library(lattice)
show.settings()
dev.off()
# plot 2
pdf(file="bugreport-2.pdf", onefile = FALSE, paper="a4", width = 18/2.54, height = 18/2.54)
with(iris, plot (Sepal.Length, Sepal.Width, pch = as.numeric(
legend (6.1, 4.4, c("setosa", "versicolor", "virginica"), cex = 1.5, pch = 1:3)
dev.off()
# plot 3
pdf(file="bugreport-3.pdf", onefile = FALSE, paper="a4", width = 18/2.54, height = 18/2.54)
plot(1:25, pch = 1:25)
dev.off()
---------<R code end>---------------
tags: | added: importing pdf |
tags: | added: fonts |
What happens is that the pdf device of R uses a latter in a symbol font rather than a true circle to represent points in the PDF. See my email about this on R's list for details: /stat.ethz. ch/pipermail/ r-help/ 2007-October/ 142356. html
https:/
When Inkscape imports the PDF, it sees these letters as letters (and has no way to do otherwise) but if the font (ZapfDingbats) is not present on the system or if it is not accessible for Inkscape or if it is not the good version or... or... or... (this is a complicated mater) it just defaults to a regular font.
I consider this to be a bug in the pdf() device of R rather than in Inkscape actually, and a pretty severe one since it can lead to data mis-representation. However it was not really picked up on R's list. Several workarounds were proposed (see the link above), mine are:
- use package RSvgDevice to output to SVG
or better
- use package Cairo which can be used as a regular plotting device (much better than R's default in my opinion) or to produce PDFs or SVGs. In both formats the output is great and Inkscape deals with it perfectly.
I hope that helps. --JiHO