Changing the number format of colorbar values
조회 수: 35 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2016년 2월 19일
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')
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Colormaps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!