[R] avoid using Dingbats symbols for points()

Hans-Joerg Bibiko bibiko at eva.mpg.de
Wed Jun 25 11:24:17 CEST 2008


Hi,

I came across with a tiny problem.

E.g.:

pdf()
plot(1:5)
points(2, 3, cex=10, pch=21, bg="grey", lwd=0.3)
points(2, 4, cex=1,  pch=21, bg="grey", lwd=0.3)
dev.off()


If I execute this I'll get a nice PDF. Fine.
But I want to edit this PDF with let's say by using Adobe Illustrator.  
If I try to open it Illustrator shows up an error message:

Missing Type 1 fonts have been substitute with the default font.
Fonts with foreign encodings have been reencoded.

I can press OK and I get an image which shows the letter 'l' instead  
of the points except for the first points() statement.
Then I read in ?pdf:

[...]
- Circle of any radius are allowed. Opaque circles of less than 10  
points radius are rendered using char 108 in the Dingbats font: all  
semi-transparent and larger circles using a Bézier curve for each  
quadrant.

OK. But is there a way to avoid replacing a circle less than 10pt  
radius by a Dingbats font? In other word I want to have a Bézier curve  
as well.

Up to now I use a very stony way à la:
[draw a pie chart with only one segment]

stars(matrix(data=1, ncol=1), draw.segments = TRUE, scale = FALSE,  
radius = FALSE, locations = c(2, 3.2), col.segments = "grey", add =  
TRUE, labels = NULL, len=0.05, lwd = 0.1)

The "only" thing I have to do is to delete an anker point for the  
segment. But if the plot has hundreds of points, well ...


I tried it out with R 2.6.2 and R 2.7 on Mac OSX 10.5.3 and Windows  
XP; always the same.

I would be appreciate for any hints.


Thanks in advance!

--Hans



More information about the R-help mailing list