I want to replace the hyphens with en dashes in a plot axes.
조회 수: 30 (최근 30일)
이전 댓글 표시
Dear all
I need help with replacing the hyphens in the y-axis with en dashes in a plot. In other words, I want to increase the length of the negative sing in the plot axis.
Thanks
Aziz
댓글 수: 0
채택된 답변
Jonas
2022년 6월 22일
i suggest you have a look into the yticklabels() and xticklabels() and do some replacement of '-' with the en dash char(0x2013).
plot(-10:10);
yticklabels()
yticklabels(replace(yticklabels(),'-',char(0x2013)));
yticklabels()
댓글 수: 2
Jonas
2022년 6월 23일
my pleasure. note that the effect vanishes if the ticks are changed or refreshed. This can also happen e.g. when you resize the figure
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!