필터 지우기
필터 지우기

setting yticks for yyaxis

조회 수: 2 (최근 30일)
Andreas Grøvan Aspaas
Andreas Grøvan Aspaas 2019년 4월 18일
댓글: Andreas Grøvan Aspaas 2019년 4월 19일
Hi!
I am having a problem setting yticks for yyaxis. I am able to set ylable, but yticks is not working. Neither of the below codes work. I get "Array indices must be positive integers or logical values". By changing yticks to start at yticks(1:2:20) I get that the "Index exceeds the number of array elements (11)". I am not sure what is meant with that?
My goal is to show temperature values at the yyaxis right side with same axis length and interval for several plots which has the same temperature, but the yyaxis left is different and therefore it has a different intervall.
yticks(-8:2:12);
yticks([-8 -6 -4 -2 0 2 4 8 10 12]);
  댓글 수: 2
Walter Roberson
Walter Roberson 2019년 4월 19일
You have a variable named yticks that MATLAB thinks you are trying to index.
Andreas Grøvan Aspaas
Andreas Grøvan Aspaas 2019년 4월 19일
Thanks a lot! I cleared everything and started over with the yticks comand and now it works. I do not know how I messed that up.

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

답변 (0개)

카테고리

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

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by