Skip to content

Commit

Permalink
minor change to viridis H colorbar color cropping
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyMarkowitz-NOAA committed Jun 24, 2024
1 parent f8f9466 commit b531a62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,12 @@ make_figure <- function(
var_breaks[i-1],"\u2013",var_breaks[i]) # ,"\u00B0C" "\u00B0"
))
}
if (virids_option == "H") {
var_color <- viridis::viridis_pal(option = virids_option)(length(var_labels))
} else {
var_color <- viridis::viridis_pal(begin = 0.2, end = 0.9, option = virids_option)(length(var_labels))
# var_color <- viridis::viridis_pal(begin = 0.2, end = 0.9, option = "B")(length(var_labels))
}
# bin var
dat <- dat %>%
dplyr::mutate(var_bin = base::cut(x = as.numeric(dat$var),
Expand Down

0 comments on commit b531a62

Please sign in to comment.