[R] why is text being rasterized with text()

Andrew Yee yee at post.harvard.edu
Thu Apr 3 07:10:35 CEST 2008


Here's a question:  I noticed that when I tried to create this simple
graph of rectangles and text, R appears to generate text that is
rasterized (this is seen both on the monitor and when the output is
directed to a pdf file).  Any thoughts?

value.seq <- c("<4",as.character(seq(from=4,to=10)),">11")
frame()
par(usr=c(0,10,0,10) )

for (r in 1:9) {

rect(r,3,r+1,3.75, border = NA, col=heat.colors(9)[r])

#this text does not appear to be rasterized
   text(r+0.5,2.75, value.seq[r], cex=0.5)

#this text appears to be rasterized

   text(5.5,2.25,"expression (log2)", cex=0.5) }

Thanks,
Andrew



More information about the R-help mailing list