Skip to content

Instantly share code, notes, and snippets.

@bagrow
Created February 1, 2011 00:12
Show Gist options
  • Save bagrow/805122 to your computer and use it in GitHub Desktop.
Save bagrow/805122 to your computer and use it in GitHub Desktop.
Love or hate the matlab jet colormap? Want it in gnuplot? Here's how to do it!
set palette defined (0 0.0 0.0 0.5, \
1 0.0 0.0 1.0, \
2 0.0 0.5 1.0, \
3 0.0 1.0 1.0, \
4 0.5 1.0 0.5, \
5 1.0 1.0 0.0, \
6 1.0 0.5 0.0, \
7 1.0 0.0 0.0, \
8 0.5 0.0 0.0 )
plot 'example_matrix.txt' u 1:2:3 with image
@bagrow
Copy link
Author

bagrow commented Feb 1, 2011

Example of matlab's jet colormap. For reference: Gnuplot's three-column matrix file format.

@endolith
Copy link

There are people who love it? o_O I thought people only chose it because it's the default and they didn't realize there were much better choices.

The 'jet' colormap must die!

"The ‘jet’ colormap, the default colormap in MATLAB, is a perceptual disaster"

Rainbow Color Map (Still) Considered Harmful

"In the absence of feedback about the data or task, the best approach for situations where color is the only display technique is probably the black-body radiation spectrum, because of its perceptual ordering and use of color to avoid contrast effects."

@bagrow
Copy link
Author

bagrow commented May 13, 2012

Harried Advisor: Show me the plots, quick!
Nervous Grad Student: Here you go. The new resul…
Advisor: What is this? I told you to use matlab!
Student: I know, but I need a new licen…
Advisor: I don't care, just make the plots!

And so, in the words of the inestimable Morpheus, welcome... to the real world.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment