필터 지우기
필터 지우기

unable to use the functionality xticklabel_rotate in matlab to make my xlabel values to be rotated to 45degrees.

조회 수: 1 (최근 30일)
Hello Everyone,
I'm currently using the Matlab R2012a(7.14.0.739) version. I'm unable to rotate my labels present on xaxis. I get the below given error each time. I tried various things but nothing seems to work. can you assist? Error Received:-
Undefined function 'XTICKLABEL_ROTATE' for input arguments of type 'double'.
Error in Research_script (line 157)
XTICKLABEL_ROTATE(gca,45);
I did try searching online and going through math documentation, but i can't figure out where I'm wrong.
Code module where error is been faced:-
y = [ 10 20 30 40 50 60 70 80 90 100];
bar(y,'stacked')
set(gca,'XTickLabel','one','two','three','four','five','six','seven','eight','nine','ten'});
XTICKLABEL_ROTATE(gca,45);

채택된 답변

Walter Roberson
Walter Roberson 2012년 11월 1일
and you need to use lowercase in the function name, xticklabel_rotate
  댓글 수: 3
Walter Roberson
Walter Roberson 2012년 11월 1일
편집: Walter Roberson 2012년 11월 1일
The code you show has no { in it to match the } that is there, so it is wrong in the form you show us.
Did you try
which xticklabel_rotate
to check whether the routine is on your path? When you downloaded the routine and unzipped it, which directory did you store the routine in? Did you use pathtool to ad that directory ?
KUSHAL
KUSHAL 2012년 11월 3일
Hi Walter,
Many Thanks for your kind help on this. The problem was with the function file which was not located in the path and this made whole mess. I didn't figure out until I saw your line "which xticklabel_rotate'. Thanks again and correcting me. Have a nice evening.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by