How to delimit the number of decimal places in a colorbar?
Mostrar comentarios más antiguos
In this case, for example:
contourf(peaks(60))
colormap cool
colorbar('location','southoutside')
i want 4 decimal places.
thnks in adv,
Respuesta aceptada
Más respuestas (2)
Here is an example of how to do it.
contourf(peaks(60))
colormap cool
C = colorbar('location','southoutside'); % Get the handle.
% Now use the current xtick to make an xticklabel we like.
L=cellfun(@(x)sprintf('%.4f',x),num2cell(get(C,'xtick')),'Un',0);
set(C,'xticklabel',L)
1 comentario
Luis Botton
el 26 de Jun. de 2018
thanks a lot.
Artur M. G. Lourenço
el 18 de Ag. de 2012
0 votos
Categorías
Más información sobre Colorbar en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!