Two dots for outliers when geom_boxplot() + geom_jitter()
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
Mickey <mikihiko.ka... @gmail.com>
Date: Sun, 8 Apr 2012 04:48:03 -0700 (PDT)
Local: Sun, Apr 8 2012 7:48 am
Subject: Two dots for outliers when geom_boxplot() + geom_jitter()
Hi,
Is it the expected result that two dots are plotted for outliers, one
on the center line and the other as jittered, when we plot with
geom_boxplot() + geom_jitter() ?
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot() + geom_jitter()
sort(mtcars[mtcars$cyl==8,'mpg'])
# [1] 10.4 10.4 13.3 14.3 14.7 15.0 15.2 15.2 15.5 15.8 16.4 17.3 18.7
19.2
We can see 3 dots for 10.4 of cyl==8 and 2 dots for 19.2.
(see http://had.co.nz/ggplot2/geom_boxplot.html )
Mickey
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Brandon Hurr <brandon.h... @gmail.com>
Date: Sun, 8 Apr 2012 14:33:06 +0100
Local: Sun, Apr 8 2012 9:33 am
Subject: Re: Two dots for outliers when geom_boxplot() + geom_jitter()
geom_boxplot is outputting the outliers and geom_jitter is outputting the same points over again. The points below the box are 10.4 as an outlier (center line) and then 10.4 and 10.4 to the left and right from geom_jitter().
Above the boxplot on cyl==8 you've got the outlier 18.7 on the center line from geom_boxplot and then 18.7 and 17.3 from geom_jitter().
You can see it easier if you do this.
p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot() + geom_jitter(outlier.colour="NA")
This erases the outliers from the geom_boxplot output.
HTH, B
On Sun, Apr 8, 2012 at 12:48, Mickey <mikihiko.ka
... @gmail.com> wrote:
> Hi,
> Is it the expected result that two dots are plotted for outliers, one > on the center line and the other as jittered, when we plot with > geom_boxplot() + geom_jitter() ?
> p <- ggplot(mtcars, aes(factor(cyl), mpg)) > p + geom_boxplot() + geom_jitter()
> sort(mtcars[mtcars$cyl==8,'mpg']) > # [1] 10.4 10.4 13.3 14.3 14.7 15.0 15.2 15.2 15.5 15.8 16.4 17.3 18.7 > 19.2
> We can see 3 dots for 10.4 of cyl==8 and 2 dots for 19.2. > (see http://had.co.nz/ggplot2/geom_boxplot.html )
> Mickey
> -- > You received this message because you are subscribed to the ggplot2 > mailing list. > Please provide a reproducible example: http://gist.github.com/270442
> To post: email ggplot2@googlegroups.com > To unsubscribe: email ggplot2+unsubscribe@googlegroups.com > More options: http://groups.google.com/group/ggplot2
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Winston Chang <winstoncha... @gmail.com>
Date: Sun, 8 Apr 2012 09:27:18 -0500
Local: Sun, Apr 8 2012 10:27 am
Subject: Re: Two dots for outliers when geom_boxplot() + geom_jitter()
> You can see it easier if you do this.
> p <- ggplot(mtcars, aes(factor(cyl), mpg)) > p + geom_boxplot() + geom_jitter(outlier.colour="NA")
I think you mean: p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot(outlier.colour=NA) + geom_jitter()
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Brandon Hurr <brandon.h... @gmail.com>
Date: Sun, 8 Apr 2012 15:29:48 +0100
Local: Sun, Apr 8 2012 10:29 am
Subject: Re: Two dots for outliers when geom_boxplot() + geom_jitter()
Yes, should have copy and pasted it from the GUI. =\
On Sunday, April 8, 2012, Winston Chang wrote:
> You can see it easier if you do this.
>> p <- ggplot(mtcars, aes(factor(cyl), mpg)) >> p + geom_boxplot() + geom_jitter(outlier.colour="NA")
> I think you mean: > p <- ggplot(mtcars, aes(factor(cyl), mpg)) > p + geom_boxplot(outlier.colour=NA) + geom_jitter()
You must
Sign in before you can post messages.
You do not have the permission required to post.