I'm trying to use 2 color functions within one matrix plot in mathematica. Is this possible to do?(adsbygoogle = window.adsbygoogle || []).push({});

For example, using a very simple matrix:

test = Partition[Table[i, {i, 1, 9}], 3]

I would like to make the even numbers vary in color increasing from white to red; and the odd numbers vary in color from grey to black.

How could I do this? I know how to get the whole matrix to vary in color, but no more than this.

Thanks

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Using 2 color functions in a mathematica matrix plot

**Physics Forums | Science Articles, Homework Help, Discussion**