how to combine the boxplot and dotchart together?

2 messages Options
Embed this post
Permalink
孟欣

how to combine the boxplot and dotchart together?

Reply Threaded More More options
Print post
Permalink
Hi all:
Suppose there're 3 groups,and I wanna compare the result of the 3 groups.
I've drawn a boxplot.But I wanna show the actural data points of each group at the same time.In other words I wanna combine the boxplot and dotchart together.
How can I do it?
 
Thanks a lot!
 
My best.


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Peter Ehlers

Re: how to combine the boxplot and dotchart together?

Reply Threaded More More options
Print post
Permalink

孟欣 wrote:
> Hi all:
> Suppose there're 3 groups,and I wanna compare the result of the 3 groups.
> I've drawn a boxplot.But I wanna show the actural data points of each group at the same time.In other words I wanna combine the boxplot and dotchart together.
> How can I do it?

Perhaps like this:

   boxplot(Sepal.Length ~ Species, data = iris)
   points(Sepal.Length ~ Species, data = iris)

or, if you have overlapping points:

   points(Sepal.Length ~ jitter(rep(1:3, each=50),
                                amount=.05),
          data=iris)

  -Peter Ehlers

>  
> Thanks a lot!
>  
> My best.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] 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.
>
>

______________________________________________
[hidden email] 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.