Skip to main content
edited tags
Link
Source Link
MXJ
  • 107
  • 7

Engineering a colour scale for MatrixPlot

I am trying to find the best way to plot my data. I have a 2D list of scalar coefficients (rational numbers) whose value lies between 0 and 1 (being rational, they can be 0,..., 0.01,... 0.999,..., 1). I want to plot the amplitude of these coefficients in 2D and use a colour function to indicate their amplitude.

I think the best way to do this is to use

MatrixPlot[] 

with options

ColorFunction -> "MyPersonalScheme" 

and (possibly?)

ColorFunctionScaling -> True 

In essence, my question is the following:

"How can I engineer a color scheme, "MyPersonalScheme", so that a coefficient of amplitude 0 is plotted in white, and a coefficient of amplitude 1 is plotted in red (and have a 'hue' of colour from white to red for amplitudes in between)?"

Thanks a lot in advance for your help!