I need to label the y-axis of a plot with the form a/GeV^-1, where ^ denotes superscript. But Mathematica always write GeV a instead, interpreting 1/GeV^-1 as GeV. How to avoid this interpretation?
2 Answers
$\begingroup$ $\endgroup$
2 There is a $\LaTeX$ typesetting package, MaTeX, written for such situations by Szabolcs.
<< MaTeX` Plot[x^2, {x, -10, 10}, AxesLabel -> MaTeX /@ {"\\text{$x$ axis}", "a/\\mathrm{GeV}^{-1}"}] 
- 1$\begingroup$ Hope you don't mind the edit :-) (feel free to revert) $\endgroup$Szabolcs– Szabolcs2017-05-24 10:33:35 +00:00Commented May 24, 2017 at 10:33
- $\begingroup$ @Szabolcs Of course not. Thanks for your corrections. $\endgroup$zhk– zhk2017-05-24 10:36:54 +00:00Commented May 24, 2017 at 10:36
$\begingroup$ $\endgroup$
1 In:
label = Row[ {"a/Ge", Superscript["V", -1] }]; Plot[Sin[x], {x, 0, 2 Pi}, AxesLabel -> label] Out:

- $\begingroup$ The answer is updated according to your suggestion. :) $\endgroup$webcpu– webcpu2017-05-24 12:16:46 +00:00Commented May 24, 2017 at 12:16
AxesLabel->{"x axis", "a/GeV^-1"}$\endgroup$