Skip to content

Commit 248e94c

Browse files
authored
Warn when using even.steps=FALSE with a discrete scale (#3881)
1 parent 818cf80 commit 248e94c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/guide-colorsteps.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ guide_train.colorsteps <- function(guide, scale, aesthetic = NULL) {
6969
# If the breaks are not numeric it is used with a discrete scale. We check
7070
# if the breaks follow the allowed format "(<lower>, <upper>]", and if it
7171
# does we convert it into bin specs
72+
if (!guide$even.steps) {
73+
warn("`even.steps = FALSE` is not supported when used together with a discrete scale")
74+
}
7275
bin_at <- breaks
7376
breaks_num <- as.character(breaks)
7477
breaks_num <- strsplit(gsub("\\(|\\)|\\[|\\]", "", breaks_num), ",\\s?")

0 commit comments

Comments
 (0)