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

annotation_logticks not synched with minor grid line breaks #1949

Closed
yonicd opened this issue Dec 8, 2016 · 3 comments
Closed

annotation_logticks not synched with minor grid line breaks #1949

yonicd opened this issue Dec 8, 2016 · 3 comments

Comments

@yonicd
Copy link

yonicd commented Dec 8, 2016

a <- ggplot(msleep, aes(bodywt, brainwt)) +
 geom_point(na.rm = TRUE) +
 scale_x_log10(
   breaks = scales::trans_breaks("log10", function(x) 10^x),
   labels = scales::trans_format("log10", scales::math_format(10^.x))
 ) +
 scale_y_log10(
   breaks = scales::trans_breaks("log10", function(x) 10^x),
   labels = scales::trans_format("log10", scales::math_format(10^.x))
 ) +
 theme_bw()

a+annotation_logticks()+theme(panel.grid.minor = element_line(colour='black'))

image

@hadley
Copy link
Member

hadley commented Jan 25, 2017

I think that's right - the minor breaks are evenly spaced between the major breaks.

@hadley hadley closed this as completed Jan 25, 2017
@yonicd
Copy link
Author

yonicd commented Jan 25, 2017

Shouldn't the log ticks also have minor grids connected to them?

@hadley
Copy link
Member

hadley commented Jan 25, 2017

No, they're completely independent.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants