필터 지우기
필터 지우기

how to rotate X Tick Label ?

조회 수: 54 (최근 30일)
Amr Hashem
Amr Hashem 2015년 7월 28일
댓글: Amr Hashem 2015년 7월 28일
I am using matlab R2009a and matlab R2012a
I want to rotate x tick label 45 degree, I use this code:
figure('color','w')
bar(cell2mat(a(:,2)));
set(gca,'XTick',1:size(a,1))
set(gca,'XTickLabel',a(:,1))
set(gca,'XTickLabelRotation',45)
set(gca,'YTick',0:max(cell2mat(a(:,2))))
axis tight
but it gives me an error
Error using ==> set
There is no 'XTickLabelRotation' property in the 'axes' class.
Error in ==> CountWordFreq02 at 51
set(gca,'XTickLabelRotation',45)
HOW I CAN SOLVE THIS ?
  댓글 수: 1
Star Strider
Star Strider 2015년 7월 28일
The 'XTickLabelRotation' property was introduced in R2014b. You would have to use a text object in place of your x-tick labels. It allows text rotation.

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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 28일
편집: Azzi Abdelmalek 2015년 7월 28일
The xticklabelrotation property is not supported by versions before Matlab R2014b. However you can find some application in File Exchange
  댓글 수: 2
Amr Hashem
Amr Hashem 2015년 7월 28일
where to find file exchange?
Amr Hashem
Amr Hashem 2015년 7월 28일

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labels and Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by