Re: [R] short plots: lwd, margin and postscript behavior

From: CÚzar Freitas <cafanselmo12_at_yahoo.com.br>
Date: Fri 18 Feb 2005 - 04:42:07 EST


OK. I'll put the two forms and the results in two attaches. There are two problems: the main is the plots saved via postscript command have large lines (lwd doesn't works). The other one is the big margins.

Thanks,
C.

PS: two attached pictures

#data
  par(fin=c(3,3))
  scores<-c(2.0, 0.0, 5.0, 5.0, 5.0, 2.0, 0.0, 5.0, 2.5, 4.0, 5.0, 0.0, 5.0, 0.0, 2.0, 5.0, 5.0, 2.0, 3.0, 3.0)
  q<-summary(scores)
  gra<-hist(scores, breaks=((0:11)/2-.2), plot=FALSE)   yy<-ceiling(max(gra$counts)/10)*10
  yz<-yy/12

#picture saved via windows gui
  par(mai=rep(.2,4), lwd=.5, fin=c(3,3))

  hist(scores, breaks=((0:11)/2-.2), xlim=c(-1,6), ylim=c(-yz,yy), main="scores", ylab="Freq", xlab="math", cex.axis=.3, cex.main=.3, cex.sub=.3, cex.lab=.3, mgp=c(1.5,.5,0), lwd=.5)
  boxplot(scores, horizontal=1, add=1, at=-2*yz/3, boxwex=1.5*yz, bty="n", axes=FALSE)
  points(q[4], -2*yz/3, col=1, pch="+", cex=.5)

#picture saved via postscript command
  par(mai=rep(.2,4), lwd=.5, fin=c(3,3))   postscript("test.ps", width=3, height=3, horizontal=FALSE, family="Times", paper="special")

  hist(scores, breaks=((0:11)/2-.2), xlim=c(-1,6), ylim=c(-yz,yy), main="scores", ylab="Freq", xlab="math", cex.axis=.3, cex.main=.3, cex.sub=.3, cex.lab=.3, mgp=c(1.5,.5,0), lwd=.5)
  boxplot(scores, horizontal=1, add=1, at=-2*yz/3, boxwex=1.5*yz, bty="n", axes=FALSE)
  points(q[4], -2*yz/3, col=1, pch="+", cex=.5)

  dev.off()



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Feb 18 05:34:14 2005

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 01:30:50 EST