-
Notifications
You must be signed in to change notification settings - Fork 2.1k
I'm confusing about width(height) argument in geom_jitter() #1775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That is clearly a bug. I think the width is being treated as a substitute for the resolution, if that is the case then the effective amount is |
@has2k1 Thanks for comment. data resolution at "
but you right. I'm still confusing.... |
I've since looked at the code and I'll submit a PR that fixes it. |
@has2k1 |
The problem was the %||% operator accepts single tokens and so care (bracketing as required) must be taken avoid miscalculations. Some other places in the code-base had it right. Fixes tidyverse#1775
The problem was the %||% operator accepts single tokens and so care (bracketing as required) must be taken avoid miscalculations. Some other places in the code-base had it right. Fixes #1775
I'm having a hard time knowing what this means: You're saying that the range of values that point could be mapped to is 3 +/- (resolution) * 0.4 so how is resolution determined? |
"width(height)" argument in geom_jitter() is described as belows.
So, I expected
geom_jitter()
andgeom_jitter(width = 0.4)
will produce same plot and"width = 0.4"
spreads points across a range"base ± resolution * 0.4"
. but the results are not.I'm confusing about width argument and how can i calculate a jitter range.
I expect like belows but the result doesn't
geom_jitter(
width = 0.2
) will spread points across a range [2.8 ~ 3.2] : 3 ± 0.2geom_jitter(
width = 0.4
) will spread points across a range [2.6 ~ 3.4] : 3 ± 0.4geom_jitter(
width = 0.6
) will spread points across a range [2.4 ~ 3.6] : 3 ± 0.6but,

geom_point(aes(x = jitter(gear, amount = 0.2))
produce a plot what i expected.Please, give me some hints...
The text was updated successfully, but these errors were encountered: