- make the plot
- get the values of ticks on the y axis
- make sure that the 'mode' is manual (so that the ticks don't change). It's always wise to set the tick values explicitly or set the mode when setting tick labels, otherwise if the ticks change things will likely look weird
- convert the values
- set the ticklabels
How to convert number format in yaxis?
조회 수: 6 (최근 30일)
이전 댓글 표시
I have a plot x-y. I would like to ask how to change the format of yaxis from arabic to roman number ? I tried to use the following function:
but it is no use.
Could you please help me?
댓글 수: 0
채택된 답변
Dave B
2021년 8월 27일
How about using: https://www.mathworks.com/matlabcentral/fileexchange/26161-roman2num-and-num2roman-modern-roman-numerals
I'm not sure what problem you had with the other submission because you didn't provide much detail about why it was no use. But I'd image the code would:
plot(...)
tickvals = yticks;
yticks manual
romanvals = num2roman(tickvals);
yticklabels(romanvals);
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!