Skip to content

Commit

Permalink
Change colors of plots
Browse files Browse the repository at this point in the history
  • Loading branch information
lalo-caballero committed May 3, 2024
1 parent eb20294 commit e90f7e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/plot-GCIMSSample.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ mat_to_gplot <- function(intmat, dt_min = NULL, dt_max = NULL, rt_min = NULL, rt
}
intmat_trans <- trans$transform(intmat)
colormap <- farver::encode_native(
viridisLite::viridis(256L, direction = -1, option = "A")
viridisLite::viridis(256L, direction = -1, option = "G")
)
nr <- mat_to_nativeRaster(intmat_trans, colormap)

Expand All @@ -101,7 +101,7 @@ mat_to_gplot <- function(intmat, dt_min = NULL, dt_max = NULL, rt_min = NULL, rt
) +
ggplot2::scale_fill_viridis_c( # This has to match with the COLORMAP above
direction = -1,
option = "A",
option = "G",
limits = minmax,
na.value = "#00000000",
trans = trans
Expand Down Expand Up @@ -267,7 +267,7 @@ overlay_peaklist <- function(
}

if (is.null(color_by)) {
color_by <- "green"
color_by <- "orange"
how_many_colors <- 1L
} else if (purrr::is_scalar_character(color_by)) {
if (color_by %in% colnames(fulldata)) {
Expand Down

0 comments on commit e90f7e4

Please sign in to comment.