フィルターのクリア

How to use latex interpreter for xticklabels?

540 ビュー (過去 30 日間)
Mr M.
Mr M. 2017 年 6 月 27 日
回答済み: Ali Afruzi 2022 年 4 月 13 日
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

その他の回答 (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 Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by