How to scale the range of a custom colormap correctly?
36 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Thomas Taufan
el 5 de Jun. de 2020
I have made a custom colormap manually and I need it to be scaled from -1 to 1, in the result I got it is scaled from about -0.25 to 0.45.
This is the right scale for the custom colormap.
I have saved the variable of the colormap manually by inputting it to a variable. For example :
custom = [ 0 1 1
1 0 0
1 0 1];
How can I save it so that I could use the colormap like other presets anywhere, for example :
colormap(jet);
0 comentarios
Respuesta aceptada
Adam Danz
el 5 de Jun. de 2020
Use caxis(limits) to scale the colormap limits of the axes. I also recommend including the optional axis handle input (see documentation within the link).
More info on color scaling:
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Colormaps en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!