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

Combining facet_zoom with geom_histogram #126

Closed
geotheory opened this issue Mar 4, 2019 · 1 comment
Closed

Combining facet_zoom with geom_histogram #126

geotheory opened this issue Mar 4, 2019 · 1 comment

Comments

@geotheory
Copy link

I wonder about feasibility of enhanced support for geom_histogram in future? Specifically the question of applying either a specific different binwidth to the zoomed facet, or by applying the same bin argument. The current implementation seems to zoom the post-binned summary:

set.seed(0)
x = tibble(date = as.Date('2018-01-01') + rnorm(500, sd=3)^3)
p = x %>% ggplot(aes(date)) + geom_histogram(bins = 50, col = 'white', size=.1) + theme_light()
p + facet_zoom(x = date >= "2017-12-01" & date <= "2018-02-01", zoom.size = 1)

image

It would be really useful to be able to drill into histograms to explore spikes and strange distributions.

@liuyanguu
Copy link

This can be done as explained at the end of this webpage: https://www.data-imaginist.com/2019/the-ggforce-awakens-again/

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

No branches or pull requests

3 participants