Skip to content

Commit

Permalink
Remove dependency on VHS-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
fabern committed Jul 8, 2024
1 parent ac1c44b commit 8b93b68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/plot_map4.R
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,13 @@ plot_map4 <- function(obj, varnam = NA, maxval = NA, breaks = NA, lonmin = -180,
geom_raster(data = df,
aes(x = x, y = y, fill = layer, color = layer),
show.legend = TRUE)
colorscale <- vhs("maxell_gu")[c(3,2)]
# colorscale <- vhs("maxell_gu")[c(3,2)]
# vhs_palettes <- list( # https://github.com/cj-holmes/vhs/blob/10692a2de29bfcf1e57d62ce992940b0b07e1470/R/palettes.R#L32
# #...
# maxell_gu =c("#1e241eff", "#29a274ff", "#777055ff")
# #...
# )
colorscale <- c("#777055ff", "#29a274ff")

} else {

Expand Down Expand Up @@ -562,7 +568,6 @@ plot_map4 <- function(obj, varnam = NA, maxval = NA, breaks = NA, lonmin = -180,


## Copied from https://github.com/adrfantini/plot_discrete_cbar

plot_discrete_cbar = function(
breaks, # Vector of breaks. If +-Inf are used, triangles will be added to the sides of the color bar
palette = "Greys", # RColorBrewer palette to use
Expand Down

0 comments on commit 8b93b68

Please sign in to comment.