const-ae / ggsignif

Easily add significance brackets to your ggplots
https://const-ae.github.io/ggsignif/
GNU General Public License v3.0
593 stars 43 forks source link

adding scale_y_log10 changes y-axis to a weird range #117

Open rxhu opened 2 years ago

rxhu commented 2 years ago

geom_signif affects scale_y_log10's behavior:

Without scale_y_log10, geom_signif works as expected, e.g. ggplot(mpg, aes(class, hwy)) + geom_boxplot() + geom_signif(annotations = c("First", "Second"), y_position = c(30, 40), xmin = c(4, 1), xmax = c(5, 3))

With scale_y_log10, y-axis become extremely large and original plots are squeezed to the bottom ggplot(mpg, aes(class, hwy)) + geom_boxplot() + geom_signif(annotations = c("First", "Second"), y_position = c(30, 40), xmin = c(4, 1), xmax = c(5, 3)) + scale_y_log10()