scales icon indicating copy to clipboard operation
scales copied to clipboard

Improve messaging in Range R6 classes

Open teunbrand opened this issue 2 years ago • 0 comments

This suggestion is lifted over from https://github.com/tidyverse/ggplot2/issues/4258.

Briefly, train_discrete() and train_continuous() throw errors that can be hard to debug in some cases. If https://github.com/tidyverse/ggplot2/pull/5086 is merged, that would leave responsibility over Range classes with {scales}, so that is why I'm opening this issue here.

My proposal would be that the Range classes get an optional field with a scale name or aesthetic name that can be used for communicating more informative errors. Responsibility for providing an informative field would then bounce the ball back to ggplot2.

teunbrand avatar Feb 14 '23 18:02 teunbrand