4

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?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
John Taylor
  • 5,701
  • 2
  • 12
  • 33

2 Answers2

8

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}"}]

Mathematica graphics

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
zhk
  • 11,939
  • 1
  • 22
  • 38
2

In:

label = Row[ {"a/Ge", Superscript["V", -1] }];
Plot[Sin[x], {x, 0, 2 Pi}, AxesLabel -> label]

Out:

Mathematica graphics

webcpu
  • 3,182
  • 12
  • 17