I would like coord_cartesian to return a more human-readable error when I mess up the syntax:
example
library(ggplot2)
ggplot(iris, aes(Petal.Length,Petal.Width)) +
geom_point() +
coord_cartesian(xlim(2,6))
observed behaviour
Error in rep(no, length.out = len) :
attempt to replicate an object of type 'environment'
In addition: Warning message:
In is.na(coord_limits) :
is.na() applied to non-(list or vector) of type 'environment'
expected behaviour
Error in coord_cartesian: did you mean "xlim = c()"?
I would like
coord_cartesianto return a more human-readable error when I mess up the syntax:example
observed behaviour
expected behaviour