How to use latex interpreter for xticklabels?

조회 수: 197 (최근 30일)
Mr M.
Mr M. 2017년 6월 27일
댓글: Dima 2024년 12월 22일
How to use latex interpreter for xticklabels or yticklabels?

채택된 답변

Adam
Adam 2017년 6월 27일
편집: Adam 2017년 6월 27일
hAxes.TickLabelInterpreter = 'latex';
assuming you are using >= R2014b, where hAxes is your axes handle
  댓글 수: 1
Dima
Dima 2024년 12월 22일
set(gca,"TickLabelInterpreter",'latex')

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

추가 답변 (2개)

Stefan Ineichen
Stefan Ineichen 2018년 11월 13일
편집: Stefan Ineichen 2018년 11월 13일
Insert the code before plotting.
set(groot,'defaultAxesTickLabelInterpreter','latex');
Further, add these to set other useful interpreter to latex.
set(groot,'defaulttextinterpreter','latex');
set(groot,'defaultLegendInterpreter','latex');
  댓글 수: 1
krishna teja
krishna teja 2019년 1월 28일
is there a way to change default font size for axes tick labels?

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


Ali Afruzi
Ali Afruzi 2022년 4월 13일
You can set 'latex' or 'tex' for only one of your axis plot.
Using TickLabelInterpreter, one can define latex for only x-axis and tex for y-axis. for example:
x=1:10;
y=rand(10,1);
plot(x,y)
xaxisproperties= get(gca, 'XAxis');
xaxisproperties.TickLabelInterpreter = 'latex'; % latex for x-axis
yaxisproperties= get(gca, 'YAxis');
yaxisproperties.TickLabelInterpreter = 'tex'; % tex for y-axis

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by