필터 지우기
필터 지우기

How do I change the tick label rotation on my colorbar?

조회 수: 126 (최근 30일)
Leon
Leon 2022년 7월 31일
댓글: Matthew Lew 2023년 12월 29일
I have a horizontal colobar and my goal is to set the tick labels of my colorbar, so that they won't tilt. Here is a screenshot of the current problem:
I tried the below but it did not work:
set(cb, 'yTickLabelRotation', 0);
  댓글 수: 2
Star Strider
Star Strider 2022년 7월 31일
If a smaller font size is a option (I realise that it might not be since this is for publication), experiment with that.
Leon
Leon 2022년 7월 31일
Thanks for sharing the tip.

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

채택된 답변

dpb
dpb 2022년 7월 31일
편집: dpb 2022년 7월 31일
They've hidden some of the ruler properties -- you have to use/access the underlying numeric ruler properties --
cb.Ruler.TickLabelRotation=0;
will let you at 'em. Search the FEX for Yair Altman's <Undocumented object properties> that will uncover what can be found of hidden properties from various graphics objects to find out such things.
I do wish TMW would get over this penchant of hiding stuff that users might still want to modify for special purposes/plots; it only seems to be getting worse and worse with "Mother knows best!" mentality.
  댓글 수: 2
Leon
Leon 2022년 7월 31일
Works like a charm! Thanks a bunch.
Matthew Lew
Matthew Lew 2023년 12월 29일
Very helpful, thank you! And I totally agree re undocumented properties. Having good documentation is an essential part of our decision to keep on using MATLAB instead of switching to another software package.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by