How to make my own color scale (ColorData) on Mathematica

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 8K views
abonatto
Messages
13
Reaction score
0
Dear All,

I started to use Mathematica to make some plots I usually did with gnuplot. I know it has some great color schemes, but I would like to be able to use the same I was using in gnuplot.

The question is: how could I create a color scheme? In gnuplot I just used the following command set palette model RGB file "FILE.TXT", and the FILE.TXT has the RGB color info:

0.00000 0.00000 0.00000 0.00000
0.25000 0.00000 0.00000 1.00000
...
1.00000 1.00000 1.00000 1.00000

Any suggestions?
 
Last edited:
Physics news on Phys.org
Hi Simon: thanks for your help!

The post is really about what I am looking for. I just have not figured out (yet) how to import my data file with RGB color " coordinates": his file (colorMapJet.mat) has a HDF5 format:

cMap = Transpose@Import["path-to-colorMapJet.mat", {"HDF5",
"Datasets", "cMap"}];

and mine should be (I think) imported like a table; I changed the format {"Table", ...} but it did not work.

I will keep trying: thanks again!