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

For stat = "bin" etc where x_transform not equal to "identity", zoom is not optimal #969

Open
davidhodge931 opened this issue Aug 20, 2024 · 1 comment

Comments

@davidhodge931
Copy link
Owner

The plot is correct, but the zoom is incorrect.

Users can adjust coord and y_breaks to fix.

Might be impossible to fix...

library(tidyverse)
library(ggblanket)

set_blanket()

ggplot(msleep, aes(x = brainwt)) +
  geom_histogram(na.rm = TRUE) +
  scale_x_log10()

msleep |>
  gg_histogram(
    x = brainwt, 
    x_transform = "log10",
  )

msleep |>
  gg_histogram(
    x = brainwt, 
    x_transform = "log10",
    y_breaks = scales::breaks_width(width = 2),
    coord = coord_cartesian(ylim = c(0, 6))
  )
@davidhodge931 davidhodge931 changed the title For stat = "bin" etc where x_transform not equal to identity, zoom is built incorrect For stat = "bin" etc where x_transform not equal to identity, zoom is incorrect Aug 20, 2024
@davidhodge931
Copy link
Owner Author

Could add an inform message...

@davidhodge931 davidhodge931 changed the title For stat = "bin" etc where x_transform not equal to identity, zoom is incorrect For stat = "bin" etc where x_transform not equal to identity, zoom is not optimal Sep 16, 2024
@davidhodge931 davidhodge931 changed the title For stat = "bin" etc where x_transform not equal to identity, zoom is not optimal For stat = "bin" etc where x_transform not equal to "identity", zoom is not optimal Sep 16, 2024
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

1 participant