Skip to content

Commit

Permalink
revert: values close to zero are being coloured green still
Browse files Browse the repository at this point in the history
  • Loading branch information
sof202 committed Aug 8, 2024
1 parent aaef7e9 commit 6a04c02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Rscripts/HeritabilityPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ create_enrichment_heatmap <- function(results_files,
Enrichment = dplyr::if_else(Enrichment < 0, NA_real_, Enrichment)
)

negative_palette <- c("red", "pink")
postitive_palette <- c("lightgreen", "darkgreen")
enrichment_heatmap <-
ggplot(enrichment_data, aes(
Expand All @@ -216,6 +217,7 @@ create_enrichment_heatmap <- function(results_files,
)) +
geom_tile(color = "black") +
scale_fill_gradient2(
low = negative_palette,
high = postitive_palette,
midpoint = 0,
na.value = "pink"
Expand Down

0 comments on commit 6a04c02

Please sign in to comment.