Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent RColorBrewer::brewer.pal warning #1999

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Sep 14, 2021

  1. Prevent RColorBrewer::brewer.pal warning

    `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
    ```
    s-fleck committed Sep 14, 2021
    Configuration menu
    Copy the full SHA
    7703cdd View commit details
    Browse the repository at this point in the history