-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorcoord 🗺️layers 📈
Milestone
Description
This behaves exactly like the closed issue #881, still here in ggplot2 version 3.3.0
Using a bit modified example
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))
)
This works:
a + coord_flip()
And this works:
a + annotation_logticks()
Now,
a + coord_flip() + annotation_logticks()
returns error: Error in unit(xticks$x, "native") : 'x' and 'units' must have length > 0
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorcoord 🗺️layers 📈