subscript, superscript in plot label

Hi,

  1. Create subscript, superscript

the plot command used to create this graph was something like

> Blockquote

lown = ListLinePlot[{tn1, tn2, tn3, tn4}, 
  PlotRange -> {{0, 40}, {0, 30}}, PlotStyle -> Reverse[colors], 
  Frame -> True, LabelStyle -> {Black, Bold}, 
  FrameLabel -> {Style["\[Delta]", 13], 
    Style["\!\(\*SubscriptBox[\(N\), \(P\)]\) g/m2", 13]}]

e = ListLinePlot[{tn0}, PlotRange -> {{0, 40}, {0, 30}}, 
  PlotStyle -> {{Red, Dashed, Thick}}, 
  PlotLegends -> {"Kmo  =0.0005", "Kmo = 0.001", "Kmo = 0.002", 
    "Kmo = 0.003"}, Frame -> True, LabelStyle -> {Black, Bold}, 
  FrameLabel -> {Style["\[Delta]", 13], 
    Style["\!\(\*SubscriptBox[\(N\), \(P\)]\) g/m2", 13]}]
Np = Show[e, lown,  PlotRange -> {{0, 40}, {0, 60}}]

I figured out how to make the subscript for Np..but i am struggling to make a superscript 2 in g/m2 and mo in kmo in the plot legend.. any help will be greatly apprecitaed thanks!

enter code here

Have you tried the basic math input palette?

Sorry .. but How helpful is that..? i have my own data here..

Sorry .. but How helpful is that..? i have my own data here..

Following Gianluca Gorni’s advice is what you want to do. That will show you all sorts of structures besides the superscript and subscript. The keyboard equivalent for getting just the two structures you’re currently using follows:

Try this

FrameLabel → {Style[“[Delta]”, 13],
Row[{Style[Subscript[“N”, “P”], Italic], " g", Superscript[m, -2]}]}

My favourite way of inserting properly typeset formulas into plots is to compose them first in a Text cell, within an inline cell. Then I copy the inline cell and paste it into the input within quotation “”. What I get, behind the scenes, is something like this:

Plot[x^2, {x, -1, 1}, Frame -> True, 
 FrameLabel -> {"\!\(\*FormBox[\(\*SubscriptBox[\(N\), \(p\)] \
g/\*SuperscriptBox[\(m\), \(2\)]\),
TraditionalForm]\)"}, BaseStyle -> {FontFamily -> "Times"}]

except that I see the readable typeset version.