Skip to content

Change meaning of trim in geom_violin #1802

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

Merged
merged 1 commit into from
Oct 6, 2016

Conversation

thomasp85
Copy link
Member

Fixes #1793

This PR changes the trim behaviour back to how it worked in v1.x.x

@thomasp85 thomasp85 added this to the v2.2.0 milestone Sep 30, 2016
@thomasp85 thomasp85 self-assigned this Sep 30, 2016
@thomasp85
Copy link
Member Author

@hadley @wch should this be the behaviour?

df <- data.frame(a = c(1:100),b=c(rep(0,50),rep(1,50)))
ggplot(df,aes(y=a,x=factor(b))) + geom_violin(trim=TRUE)

rplot

ggplot(df,aes(y=a,x=factor(b))) + geom_violin(trim=FALSE)

rplot01

no_range <- data.frame(x = factor(rep(1, 10)), y = rep(0, 10))
ggplot(no_range, aes(x, y)) + geom_violin(trim = TRUE)

rplot02

ggplot(no_range, aes(x, y)) + geom_violin(trim = FALSE)

rplot03

@wch
Copy link
Member

wch commented Sep 30, 2016

Looks good to me.

@thomasp85
Copy link
Member Author

@hadley ?

@hadley
Copy link
Member

hadley commented Oct 3, 2016

LGTM

@hadley hadley merged commit 6619fa6 into tidyverse:master Oct 6, 2016
schloerke added a commit to schloerke/ggplot2 that referenced this pull request Oct 6, 2016
* master: (30 commits)
  Elucidate & implement consistent principles for discrete NA
  Change meaning of trim (tidyverse#1802)
  Document strip.placement theme setting
  Style tweaks for theme()
  More sophisticated facet var evaluation strategy
  Teach rd_aesthetics about optional aesthetics
  Allow defintion of optional aes
  Link to geom_count from geom_point help
  Improve geom_density docs.
  Support hms position scales
  Correct aesthetic specs for bar charts
  Add check.aes and check.param args to layer()
  Handle sign transforming transformations
  Axis labels should always be character
  Only format numbers
  Update revdep email
  Re-run revdeps
  Run revdep check
  fix stacking (tidyverse#1817)
  Fix axis names for FacetNull (tidyverse#1814)
  ...
@lock
Copy link

lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants