Skip to content

boxplot tick locations

3 messages · Peter Alspach, Sherri Heck

#
hi all-

i am creating a boxplot and would like to shift the x-axis tick marks 
(named 1:23) so that the ticks are in between the boxes and not centered 
in the middle of the boxes. i have searched the help files and google 
and have not found what i am looking for.

does anyone know how to do this?

thanks!

s.heck
University of Colorado, Boulder
#
Sherri

Is this what you want?

sherri <- data.frame(grp=rep(letters[1:6], 20), value=rnorm(6*20)+6)
temp <- with(sherri, boxplot(value~grp, xaxt='n'))
axis(1, 1:5+0.5, rep('', 5))

Peter Alspach
The contents of this e-mail are privileged and/or confidential to the named
 recipient and are not to be used by any other person and/or organisation.
 If you have received this e-mail in error, please notify the sender and delete
 all material pertaining to this e-mail.
1 day later
#
Hi Peter-

that worked wonderfully!  I am having a hard time adding "labels" to the 
tick marks.  I've tried a myriad of things.  I just want to label the 
ticks 1- 23. 
any thoughts?

thanks again for your help!

sheck
Peter Alspach wrote: