Closed
Description
Prompted by #5684, we should probably emit more meaningful messages when position guides are specified in coord systems that do not support them.
coord_map()
emits warning, but could do with a better message:
library(maps)
library(ggplot2)
nz <- map_data("nz")
ggplot(nz, aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", colour = "black") +
coord_map() +
guides(x = guide_axis(angle = 45))
#> Warning: `guide_axis()` cannot be used for .
#> ℹ Use one of x, y, or r instead.
coord_polar()
is silent
ggplot(mpg, aes(displ, hwy)) +
geom_point() +
coord_polar() +
guides(x = guide_axis(angle = 45))
Created on 2024-02-23 with reprex v2.1.0