[R] change margins or regions?!
Stephan Holl
sholl at gmx.net
Sun Jul 21 22:58:05 CEST 2002
Dear guRus,
after solving serveral other probs with boxplots, my ylabs do not appear
correct.
They area cut off.
I guess I have to change the letf and right margins, but I do not know
how.
Here is an example:
http://frosch.homelinux.org/tmp/plot.png
Thats the code i tried to use:
<R-code>
oldpar <- par()
# changing the margins
par(mar=c(4.1,5.1,4.1,5.1) +0.1)
P <- boxplot(bs.s ~ geologie, data=frame34, xlab="Gew.-Prozent der
Sand-Gehalte [%]", col="grey", main=("Boxplot der Sandgehalte im
Einzugsgebiet Hacketal"), horizontal=T, axes=F, varwidth=T)
segments(P$stats[3, ], 1:length(P$n) - 0.4, P$stats[3, ], 1:length(P$n)
+ 0.4, lwd = 3, col = "black")
box()
par(las=2)
axis(2, label=P$names)
axis(4, label=P$n)
par(las=1)
axis(1)
dev.off()
par(oldpar)
</R-code>
another possible sollution would be to change the ylabs to letters
1:length(P$n)
and make a legend nearby
(...but I dont know how to use the legend-command ;-()
Anyway, thank you for your help
steph
--
Linux: the operating system with a CLUE...
Command Line User Environment.
--------------------------------------
Stephan Holl
GnuPG Key-ID: 11946A09
ICQ# 117277975
--------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20020721/2bb9d01d/attachment.bin
More information about the R-help
mailing list