Skip to content

Commit

Permalink
make differences in correlations more pronounced in color
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneoberman committed Oct 23, 2024
1 parent 75b9958 commit 0aea399
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions R/plot_corr.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,15 @@ plot_corr <-
)
}
if (diff) {
gg <- gg + ggplot2::scale_fill_gradient2(
low = ggplot2::alpha("deepskyblue", 1),
mid = "lightyellow",
high = ggplot2::alpha("orangered", 1),
gg <- gg + ggplot2::scale_fill_gradientn(
colors = c(
"deepskyblue4",
"deepskyblue",
"lightyellow",
"orangered",
"orangered4"
),
values = c(0, 0.475, 0.5, 0.525, 1),
na.value = "grey90",
limits = c(-2, 2)
)
Expand Down

0 comments on commit 0aea399

Please sign in to comment.