MATLAB Answers

how to write superscripts for x-axis in a boxplot

5 views (last 30 days)
NA
NA on 6 Jan 2020
Answered: Adam Danz on 6 Jan 2020
I have
h=boxplot(x, g, 'notch','off','label', {'89_{p}','10007_{p}','3067_{M}'});
how to write p as a superscripts for x-axis

  0 Comments

Sign in to comment.

Accepted Answer

Adam Danz
Adam Danz on 6 Jan 2020
set(gca,'TickLabelInterpreter','tex')

  0 Comments

Sign in to comment.

More Answers (1)

Max Murphy
Max Murphy on 6 Jan 2020
% h=boxplot(x, g, 'notch','off','label', {'89_{p}','10007_{p}','3067_{M}'});
% You were using subscript operator (_)
h=boxplot(x, g, 'notch','off','label', {'89^{p}','10007^{p}','3067^{M}'});

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!