Changing the number format of colorbar values
35 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
John
el 18 de Feb. de 2016
Comentada: John
el 19 de Feb. de 2016
My color bar values are huge and I would love to maximize on the plot space. How can I change the values of my colorbar to say value * 10^8. Thanks
2 comentarios
Walter Roberson
el 19 de Feb. de 2016
Which MATLAB version? The methods are different from R2014b onwards.
Respuesta aceptada
Walter Roberson
el 19 de Feb. de 2016
In R2014b or later, colorbar objects have a http://www.mathworks.com/help/matlab/ref/colorbar-properties.html TickLabels property and also a TickLabelInterpreter. So you could for example,
cb = colorbar();
set(cb, 'Ticks', [10^7, 2.5*10^7, 5*10^7, 7.5*10^7, 10^8], 'TickLabels', {'10^7', '2.5 x 10^7', '5 x 10^7', '7.5 x 10^7', '10^8'}, 'Interpreter', 'tex')
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!