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

Adjust DHARMa plots for color blindness #413

Closed
florianhartig opened this issue May 28, 2024 · 7 comments
Closed

Adjust DHARMa plots for color blindness #413

florianhartig opened this issue May 28, 2024 · 7 comments
Milestone

Comments

@florianhartig
Copy link
Owner

I was told that the red-block color scheme in many DHARMa plots is not suitable for color blindness (my bad, didn't realise that red-black is nearly as bad as red-green).

Color-blind people, feel free to comment what the best solution would be.

For the moment, I think I would maybe move to an option to change signal colours in DHARMa from red to something else (e.g. blue)?

@florianhartig
Copy link
Owner Author

Maybe do this via options?

@florianhartig
Copy link
Owner Author

e.g. options(DHARMaSignalColor = "blue")

@florianhartig florianhartig added this to the 0.4.7 milestone Sep 11, 2024
@mariusbarth
Copy link

mariusbarth commented Sep 30, 2024

Given that the current standard colors are black and red, you could simply code them as 1 and 2 (where 1 = "black and 2 = "red" is R4's default) and let users specify their colors via palette().

@florianhartig
Copy link
Owner Author

Thanks Marius, this would in principle be a perfect solution but our DHARMa red is not "red" (as in R3) and not the 2 in the R4 pallete, and I'm not sure if I like the R4 value 2 ... @melina-leite, maybe you can do a few test plots?

@florianhartig
Copy link
Owner Author

I think it's saver to got with the options - I'll push the write to options at startup and then access via .Options$DHARMaSignalColor or getOption("DHARMaSignalColor")

florianhartig added a commit that referenced this issue Oct 8, 2024
This is for #413
@melina-leite
Copy link
Collaborator

Hi, I substituted the default color and introduced notes on the plot help files. Did some plot tests and it seems to be ok now. :)

@florianhartig
Copy link
Owner Author

Hi Melina,

I wonder if we should add a note about this in the vignette as well?

Also, in the help of plotResiduals, there it displays for me

> If nObs > 10000, the scatter plot is replaced by graphics::smoothScatter
> 
> #' @note The color for highlighting outliers and quantile lines/splines with significant tests can be changed by setting options(DHARMaSignalColor = "red") to a different color. See getOption("DHARMaSignalColor") for the current setting. This is convenient for a color-blind friendly display, since red and black are difficult for some people to separate.

so probably there is a double @note?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants