Reverse color palette

Issue #806 resolved
Yu Wai Chen created an issue

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)

  1. Xinqiu Yao

    The R base rev() function should do the trick. But in plot.dmat(), the input color palette is a function. So, something like:

    plot.dmat(d, color.palette=function(n) rev(bwr.colors(n)))

  2. Log in to comment