ytickformat('percentage') not working with latex interpreter
조회 수: 10 (최근 30일)
이전 댓글 표시
I want to use ytickformat('percentage') in my figures.
In these figures I've set the defaultAxesTickLabelInterpreter to latex since I want to include these figures in a latex report. If I set the interpreter, the values on the yaxis dissapear completely. How can I solve this?
The following code:
figure(1)
plot(1:100)
ytickformat('percentage')
figure(2)
% This is the command I use at the beginning of my actual code to set the interpreter for all axes.
set(groot, 'defaultAxesTickLabelInterpreter','latex');
plot(1:100)
ytickformat('percentage')
Produces these two figures:
This is on R2022a
Thanks!
댓글 수: 0
채택된 답변
Star Strider
2023년 3월 19일
This:
ytickformat('$%g \\%%$')
seems to work —
figure(1)
plot(1:100)
ytickformat('percentage')
figure(2)
% This is the command I use at the beginning of my actual code to set the interpreter for all axes.
set(groot, 'defaultAxesTickLabelInterpreter','latex');
plot(1:100)
ytickformat('$%g \\%%$')
MATLAB doesn’t recognise all the LaTeX format options, so the one in the LaTeX documentation did not work.
.
추가 답변 (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!