magpylib / magpylib

Python package for computation of magnetic fields of magnets, currents and moments.
https://magpylib.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
248 stars 42 forks source link

Green-red magnetization color contributes to misuse of color in science comunication #809

Open OrtnerMichael opened 3 months ago

OrtnerMichael commented 3 months ago

Green-red is actually a very unfortunate choice of colors, as 10% of humanity suffers from red-green color blindness..

The misuse of colour in science communication https://www.nature.com/articles/s41467-020-19160-7 https://www.kennethmoreland.com/color-advice/ https://www.nature.com/articles/d41586-021-02696-z https://www.ascb.org/science-news/how-to-make-scientific-figures-accessible-to-readers-with-color-blindness/

While DS 91479 will remain with RED-GREEN, we should consider what should become the magpylib default. We will not be able to abide by DINS SPEC default because there symbols will be used to annotate zones.

image

We could instead offer several named default styles e.g. to get the din-spec default style

style_color="red_green3"

or "red_blue2" or "red_blue3"

fslanovc commented 3 months ago

Please also add the corresponding colorbars to magpylib, so that the side view for instance can also be used in custom plots. For instance: magpy.cm.get_cmap("red_green3") could return a matplotlib colormap similar to e.g. mpl.cm.get_cmap("PiYG") that can return the rgb-colorcode for given parameter 0<=x<=1.