How do you set a new default colormap for Matlab?
    42 views (last 30 days)
  
       Show older comments
    
    Timothy Nikoley
 on 27 Sep 2016
  
    
    
    
    
    Commented: Stephen23
      
      
 on 7 Apr 2020
            I want the default colormap for all of my projects to be jet? Can anyone tell me how I set this to be the default?
7 Comments
  Bob photonics
      
 on 6 Apr 2020
				This alone is why jetmap is still useful for some people, because there's no automatic built-in function for this:How to display data with a focus on a different area
Non of these colormaps are bad, seem are ugly (subjectively), it's all about who uses it and how it's used.
It's misleading because either the person using it doesn't know exactly what they are doing or because they want to mislead their audience. Very easy example, is Word is easy to use, so people mess up the layout. Latex is harder to use but because it's so strict it's hard to mess up the layout. Still if one uses Word properly then it isn't really bad, many people complain that word is bad, but in reality it are the users who are bad at using it. Same with using a colormap Jet or whatever colormap you want to use. 
So yes it's good jet is not the standard, I agree 100%. However that does not make Jet a bad colormap in specific situations it can be useful. Every paper can scream that it's misleading however much they want, doesn't make it a bad colormap if used in under the right circumstances. 
More importantly doing ANY kind of quantative data analysis based on a plot with color is complete idiocricy, you can only use surface plots for qualitative analysis, hence why in certain situations Jet can be useful.
Lastly if something is published in color than it should be observed in color and not grayscale. You either publish it in Grayscale or in Color and the only time it should be compatible is when you NEED to publish in both. Otherwise you're losing out on the improvements you can have because of color.
  Stephen23
      
      
 on 7 Apr 2020
				"It's misleading because... " of the banding due to piecewise linear interpolation in RGB colorspace.
 JET
 JET TURBO
 TURBOHighly recommended reading:
Accepted Answer
  Massimo Zanetti
      
 on 27 Sep 2016
        
      Edited: Massimo Zanetti
      
 on 27 Sep 2016
  
      You need to set it default at root level. Type this in the command line:
set(0,'DefaultFigureColormap',feval('jet'));
4 Comments
  Johnny B
 on 28 Feb 2018
				... and now I've figured out the problem. The 'jet' command (and presumably all the other colormap commands) gets the current figure's colormap size to decide how large of a matrix to return. It calls 'gcf', which is guaranteed to return a valid figure handle, so a figure gets created. I changed the command to
set(0, 'DefaultFigureColormap', jet(64))
and the gratuitous figure no longer appears.
  Irl Smith
 on 26 Feb 2020
				One minor glitch: apparently when this is set at level 0 (or at groot -- is that the same thing?) in startup.m, it cannot be changed by a subsequent set(0, ..., even in startup.m. This "stuck" behavior does not occur if the set(0... occurs in the command window.
More Answers (0)
See Also
Categories
				Find more on Color and Styling in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!







