Skip to content
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

Add additional methods to rescale and rescale_mid #92

Merged
merged 4 commits into from
Jun 27, 2017

Conversation

karawoo
Copy link
Collaborator

@karawoo karawoo commented Jun 26, 2017

#75 didn't include a rescale.NULL method, which is sometimes needed. For example this:

library("ggplot2")
ggplot(mtcars, aes(cyl, mpg)) +
  geom_point() +
  scale_x_continuous(breaks = NULL)

should create a plot like:

But currently it throws Error in UseMethod("rescale"): no applicable method for 'rescale' applied to an object of class "NULL" instead. The lack of rescale.NULL also broke some code in the ggplot2-specs vignette.

@karawoo karawoo requested a review from hadley June 26, 2017 23:45
@zeehio
Copy link
Contributor

zeehio commented Jun 27, 2017

Thanks @karawoo. Do you think scales needs to provide a rescale_mid.NULL method as well?

@hadley
Copy link
Member

hadley commented Jun 27, 2017

Looks good. As @zeehio suggests, can you please also add rescale_mid.NULL?

@karawoo
Copy link
Collaborator Author

karawoo commented Jun 27, 2017

Will do. We also need logical methods for this test to pass.

@karawoo karawoo changed the title Add rescale.NULL Add additional methods to rescale and rescale_mid Jun 27, 2017
@karawoo karawoo merged commit 7fa001e into r-lib:master Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants