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

AI Thread Summary
The discussion focuses on transitioning from gnuplot to Mathematica for creating plots, specifically regarding the use of custom color schemes. The user seeks to replicate a gnuplot color palette in Mathematica, which involves importing RGB color data from a file. They reference a Stack Overflow post that discusses a similar issue with Matlab RGB data, highlighting the need for proper file importation. The user is attempting to import their RGB data file, which is formatted as a table, but encounters difficulties. They express gratitude for previous assistance and indicate a commitment to continue troubleshooting the import process.
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!
 

Similar threads

Replies
0
Views
2K
Replies
2
Views
2K
Replies
2
Views
3K
Replies
1
Views
2K
Back
Top