[R] question about boxplot
Stephen Tucker
brown_emu at yahoo.com
Fri Feb 23 13:59:29 CET 2007
You can also set axes=FALSE as in
boxplot( p.prop ~ R + bins, axes=FALSE )
and then add your own labels with axis(). the argument 'at' for axis() in the
case of boxplots are usually integers going from 1 to # of groups, though I
don't know specifically for your crossed factors.
For rotated names, you probably want to set axis(#arguments#,labels=FALSE)
and then use text() with 'srt' (don't forget to use xpd=TRUE in text()).
par("cxy") may help with positioning text relative to axis.
all the best,
st
--- Michael Kubovy <kubovy at virginia.edu> wrote:
> On Feb 22, 2007, at 2:56 PM, Smith, Phil ((CDC/CCID/NCIRD)) wrote:
>
> > boxplot( p.prop ~ R + bins )
> >
> > This command makes nice boxplot for the factor "R" crossed with the
> > factor "bins".
> >
> > I am having alot of trouble getting control of the labels on the X
> > axis. I want to control it more by specifying what the labels are,
> > controling the 'size' of those labels (by using cex), and then
> > control the rotation of the character strings of those labels (by
> > using srt or crt).
> >
> > There is a "names" argument to boxplot, but I haven't had much luck
> > controlling what it prints, the size of the font, and the character
> > rotation.
>
> Would you consider an easy way out---an alternative with reasonable
> defaults?
>
> data(ToothGrowth)
> bwplot(dose ~ len | supp, ToothGrowth)
> _____________________________
> Professor Michael Kubovy
> University of Virginia
> Department of Psychology
> USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
> Parcels: Room 102 Gilmer Hall
> McCormick Road Charlottesville, VA 22903
> Office: B011 +1-434-982-4729
> Lab: B019 +1-434-982-4751
> Fax: +1-434-982-4766
> WWW: http://www.people.virginia.edu/~mk9y/
>
> ______________________________________________
> 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
> and provide commented, minimal, self-contained, reproducible code.
>
____________________________________________________________________________________
Never miss an email again!
More information about the R-help
mailing list