labels of a box plot in latex format

8 ビュー (過去 30 日間)
Luis Isaac
Luis Isaac 2020 年 8 月 21 日
コメント済み: Walter Roberson 2020 年 8 月 21 日
Dear
I am making a boxplot:
Labels={'D5%', 'D10%','D15%','D20%','D25%','D30%','D35%','D40%', ...
'D45%','D50%','D55%','D60%','D65%','D70%','D75%','D80%', ...
'D85%','D90%','D95%','D100%'};
boxplot(RelDiff,'Labels',Labels);
But I would like to go one step furhter, and I want to plot each label with a subscript, i.e. replace 'D5%' by 'D_{5%}' in latex format
Is there any way to do it?
Thanks in advanced!!

採用された回答

Walter Roberson
Walter Roberson 2020 年 8 月 21 日
The documentation says,
"To remove labels from a plot , use the following command: set(gca,'XTickLabel',{' '})."
This tells us that what you pass is being used as XTickLabels. In turn that tells us that you can set the axes TickLabelInterpreter property to tex or latex

その他の回答 (1 件)

Luis Isaac
Luis Isaac 2020 年 8 月 21 日
Many thanks
In the same way I would like to change the FontSize of these labels
From other answers I try
boxplot(RelDiff,'Labels',Labels);
set(findobj(gca,'Type','text'),'FontSize',20)
But it do not work
What is wrong?
thanks in advance
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 8 月 21 日
set(gca, 'FontSize', 20)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by