How do you set a new default colormap for Matlab?

41 visualizzazioni (ultimi 30 giorni)
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 Commenti
Bob photonics
Bob photonics il 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.

Accedi per commentare.

Risposta accettata

Massimo Zanetti
Massimo Zanetti il 27 Set 2016
Modificato: Massimo Zanetti il 27 Set 2016
You need to set it default at root level. Type this in the command line:
set(0,'DefaultFigureColormap',feval('jet'));
  4 Commenti
Johnny B
Johnny B il 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
Irl Smith il 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.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Color and Styling in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by