taiyun / corrplot

A visual exploratory tool on correlation matrix
https://github.com/taiyun/corrplot
Other
316 stars 86 forks source link

About the warning display " stop("color limits should cover matrix") " #140

Closed jackyrx closed 3 years ago

jackyrx commented 5 years ago

This warning " stop("color limits should cover matrix") " have some issues, while the code only used the comparison of greater than the min and smaller than the max, in order to determine should it be raise the warning and stop the program.

Would that be inclusive, such as if user provided a custom limit c(0, 1). Then, there might be chance that getting 0 or 1. In the current design of the program will restrict the user to use this range, unless they specify with c(-0.001, 1.001).

The current code is

`

if (any(corr < cl.lim[1]) || any(corr > cl.lim[2])) { stop("color limits should cover matrix") }

`