boxuancui / DataExplorer

Automate Data Exploration and Treatment
http://boxuancui.github.io/DataExplorer/
Other
509 stars 88 forks source link

Color inconsistency in plot_missing #129

Open Quentin62 opened 5 years ago

Quentin62 commented 5 years ago

Hi, When you use plot_missing, colors associated with good, bad, OK, remove changed regarding the content of the data:

library(DataExplorer)

df <- data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100), a = rnorm(100), b = rnorm(100))

plot_missing(df)# good in red

image

df$x[1:4] = NA
df$z[91:100] = NA

plot_missing(df)# good in red, OK in blue

image

df$a[40:80] = NA

plot_missing(df)# good in green, bad in red, OK in an other blue

image

It would be more understandable to have a fixed color code.

Thanks

boxuancui commented 5 years ago

Thanks! I believe there is a work-around here: https://stackoverflow.com/a/55941266/2158269. Please use that while I come up with a more generic solution to colors.