Skip to content

Commit

Permalink
Fixes Open-Systems-Pharmacology#220 expressions are check first when …
Browse files Browse the repository at this point in the history
…creating plot ticks
  • Loading branch information
pchelle committed Feb 24, 2022
1 parent fe4eac2 commit 0bca761
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions R/plotconfiguration-axis.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ createPlotScale <- function(scale) {
#' @return name of the `ggplot2` scale
#' @keywords internal
createPlotTicks <- function(ticks) {
if (isOfLength(ticks, 0)) {
if (isEmpty(ticks)) {
return(waiver())
}
if (isOfType(ticks, c("numeric", "function", "expression"))) {
return(ticks)
}
# If character
if (isIncluded(ticks, c("default", "identity"))) {
return(waiver())
}
if (isIncluded(ticks, c("none"))) {
return(NULL)
}
if (isOfType(ticks, c("numeric", "character", "function", "expression"))) {
return(ticks)
}
return(ticks)
}


Expand Down

0 comments on commit 0bca761

Please sign in to comment.