Hi all.
I'm working with a short plot (3x3 inches), but the
results (via postscript command) are not nice. The lwd
command don't affect the lines (that are very large)
and the margins don't change using oma, mai, mar, ...
Below I put an example. Moreover, save the graphics
via postscript command isn't working well (see the
attached ps).
Thanks by the help,
Cezar Freitas.
#Example:
#data
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
#plot via postscript
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))
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()
_______________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: via_postscript.ps
Type: application/postscript
Size: 6629 bytes
Desc: via_postscript.ps
Url :
https://stat.ethz.ch/pipermail/r-help/attachments/20050217/abac04f1/via_postscript.ps
-------------- next part --------------
A non-text attachment was scrubbed...
Name: via_R.ps
Type: application/postscript
Size: 32296 bytes
Desc: via_R.ps
Url :
https://stat.ethz.ch/pipermail/r-help/attachments/20050217/abac04f1/via_R.ps
C?zar Freitas wrote:> Hi all. > I'm working with a short plot (3x3 inches), but the > results (via postscript command) are not nice. The lwd > command don't affect the lines (that are very large) > and the margins don't change using oma, mai, mar, ... > Below I put an example. Moreover, save the graphics > via postscript command isn't working well (see the > attached ps). > Thanks by the help,Setting lwd=0.5 works for me, as well as using par(mar=c(....))> Cezar Freitas. > > #Example: > #data > 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 > > #plot via postscript > postscript("test.ps", width=3, height=3, > horizontal=FALSE, family="Times", paper="special")par(mar=rep(1,4)+.1, lwd=0.5)> 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))add lwd=0.5 Uwe Ligges> 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 at 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