Reverse color palette
Issue #806
resolved
Dear colleague,
How can I use the bwr.colors palette in the reverse order, i.e. red for negative; blue for positive, e.g. in plot.dmat? Thanks a lot.
Comments (3)
-
-
reporter Thanks a lot!
-
reporter - changed status to resolved
This is resolved.
- Log in to comment
The R base
rev()
function should do the trick. But inplot.dmat()
, the input color palette is a function. So, something like:plot.dmat(d, color.palette=function(n) rev(bwr.colors(n)))