Skip to content

boxplot of different colors

8 messages · Sarah Goslee, Richard M. Heiberger, Elaine Kuo +1 more

#
Hi Elaine,

Without a reproducible example it's impossible to say, but I'd take a
hard look at:
table(obs.group)

If that doesn't give you some insight, a small reproducible example
included in your email using dput() would allow us to answer you more
effectively.

Sarah
On Mon, Sep 24, 2012 at 6:23 PM, Elaine Kuo <elaine.kuo.tw at gmail.com> wrote:

  
    
#
Shamelessly stealling Richard Heiberger's data set I'd suggest another way using ggplot2 which you would need to install

library(ggplot2)

dataN <- data.frame(GE_distance=rnorm(260),
                    Diet_B=factor(rep(1:13, each=20)))

p  <-  ggplot(dataN , aes(Diet_B, GE_distance, colour = Diet_B  )) + geom_boxplot() +
       xlab("Migration") + ylab("Distance")
p 


John Kane
Kingston ON Canada
____________________________________________________________
Send any screenshot to your friends in seconds...
Works in all emails, instant messengers, blogs, forums and social networks.
TRY IM TOOLPACK at http://www.imtoolpack.com/default.aspx?rc=if2 for FREE