[R] font=5 (Was: greek symbols using pch)

Earl F. Glynn efg at stowers-institute.org
Wed Oct 12 17:12:31 CEST 2005


"ecatchpole" <E.Catchpole at adfa.edu.au> wrote in message
news:434C9CBA.2090901 at adfa.edu.au...
> Earl,
>
> I don't think that's a bug. Try
>
> pdf("font5.pdf", onefile=FALSE)
>
> and similarly for postscript().

Mea culpa. The onefile=FALSE wasn't necessary (and caused Ghostscript not to
open the postscript file).

The 2nd page was caused by an erroneous second plot statement in ShowFont5,
which I put there for a one time test and then I failed to remove it.  I was
getting two pages because I had two plot statements.  Sorry for the
confusion.

All works fine with this code, which has only one plot statement, even with
postscript and pdf files:

ShowFont5 <- function()
{
  oldpar <- par(font=5, las=1)
  plot(0:15,0:15,type="n",ylim=c(15,0),
    main="Symbols in Font=5",
    xlab="", ylab="",xaxt="n", yaxt="n")
  axis(BOTTOM<-1, at=0:15)
  axis(LEFT  <-2, at=0:15, 16*0:15)
  abline(v=0.5 + 0:14,
         h=0.5 + 0:14, col="grey", lty="dotted")
  for(i in 0:255)
  {
    x <- i %%16;
    y <- i %/% 16;
    points(x,y,pch=i)
  }
  par(oldpar)
}


efg




More information about the R-help mailing list