I am writing several papers that require density plots of complex-valued functions of two variables f:R^2→C, where I'm primarily interested in the complex argument arg(f(x,y)) as a function of the input variables, but I wish to emphasize only the regions where the modulus |f(x,y)| is high.
Because of this, my approach thus far has been to produce density plots where the phase arg(f(x,y)) is encoded as the hue, and the modulus |f(x,y)| is encoded as a HSV chroma blend from white (where the modulus is zero, and arg(f(x,y)) is meaningless) to fully-saturated color at maximal modulus, where the phase is a meaningful variable.
However, this scheme suffers from being "non-orthogonal", in that some hue values (notably yellow and cyan) are much lighter than the baseline set by e.g. red or blue. I am looking for a combination that fixes these shortcomings, by providing:
- A periodic color scale for the angle-like function value that passes through as many different colors as possible (i.e. at least some six distinct values, with a premium on contrast between them) while still maintaining a constant visual 'strength' throughout that traverse. I care primarily about subjective strength, but lightness is probably a good stand-in.
- A conjugate color scale that goes from white to fully-'saturated' color that is as 'orthogonal' as possible to the angle variable.
As an example of what I'm looking for, this is a plot of the function f(x,y) = (x+iy)^2 exp(-(x^2+y^2)) using my current plotting conventions:
Mathematica source via
Note in particular how you can immediately read the
^2 exponent from the fact that over a round-trip around the origin you do a red→green→blue→back-to-red loop twice, while still being able to clearly tell that the function is concentrated at a ring around the origin between radii ~0.5 and ~1.5. However, there are still perceived 'intensity' gradients azimuthally within this ring (notably the perceived 'lobes' around the blue areas), which I would like to avoid. I would also, if nothing else, like to smoothen the visual contrast around the sharp ray-like features at yellow, cyan and, to a slightly lesser extent, magenta.
A few final notes:
- This problem arises because I'm attempting the ambitious goal of plotting two-dimensional values on a single density plot. I know that this is an ambitious goal and that it may be impossible to fulfill completely. Nevertheless, I think it is still worth doing as good as possible with it.
- I have indeed considered other formats to present the same information; you can assume that I've explored them thoroughly and found that they are too cumbersome or otherwise unclear.
- This approach will obviously only work when printed out in color, and grayscale printing (either on the print journal or when readers print it out at home) will leave most of this information out. You can assume that I've weighed the pros and cons of this and decided that it's still worth including.
- This is also an accessibility problem for readers with color vision deficiency. This is, I feel, an unfortunate necessity of plotting two-dimensional values on a density plot, and I feel the added clarity for non-CVD readers is a worthwhile tradeoff once the information loss for CVD readers is mitigated via other means.
So, with that said: are there better options for dealing with this problem than the hue-chroma combination I'm currently using?