I'm trying to add percentage signs to TickLabels in colorbar
Here's my code:
contourf(peaks)
c = colorbar;
c.TickLabelFormat = '%g%%'
yet the next message appears: "No public property TickLabelFormat exists for class matlab.graphics.illustration.ColorBar"
I know you can set the scale value with symbols manually as it's explained here:
https://www.mathworks.com/help/matlab/creating_plots/change-colorbar-width.html
but I would like add the symbol to any value the colorbar takes. It should look like this:
I would really appreciate any help you could give me. Thanks!

 채택된 답변

jonas
jonas 2018년 8월 22일
편집: jonas 2018년 8월 22일

0 개 추천

c = colorbar;
c.Ruler.TickLabelFormat='%g%%'

추가 답변 (1개)

dpb
dpb 2018년 8월 22일

0 개 추천

c.Ruler.TickLabelFormat='%g%%';
Unfortunately, you can only know about this by using Yair's function to discover undocumented/hidden properties UNDOCUMENTED

댓글 수: 1

Emanuel Valdes
Emanuel Valdes 2018년 8월 23일
Thank you @dpb! indeed, it's very difficult to find that property

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

제품

질문:

2018년 8월 22일

댓글:

2018년 8월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by