Commit 3bd4448
authored
Prevent RColorBrewer::brewer.pal warning (#1999)
`RColorBrewer::brewer.pal()` throws an (in this case) unnecessary warning if the output plot requires less than 2 colors. This is an easy fix, and does not change the workings of the code since `RColorBrewer::brewer.pal()` never returns less than three levels anywas:
```
> RColorBrewer::brewer.pal(2, "Set2")
[1] "#66C2A5" "#FC8D62" "#8DA0CB"
Warning message:
In RColorBrewer::brewer.pal(2, "Set2") :
minimal value for n is 3, returning requested palette with 3 different levels
```1 parent aa619dc commit 3bd4448
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
783 | 783 | | |
784 | 784 | | |
785 | 785 | | |
786 | | - | |
| 786 | + | |
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
| |||
0 commit comments