Message Boards Message Boards

0
|
14957 Views
|
6 Replies
|
1 Total Likes
View groups...
Share
Share this post:

subscript, superscript in plot label

Posted 8 years ago

Hi,

1) Create subscript, superscript

enter image description here

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
POSTED BY: ash ash
6 Replies

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.

POSTED BY: Gianluca Gorni

Try this

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

POSTED BY: S M Blinder
Posted 8 years ago

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:

Super and subscript keyboard shortcuts

POSTED BY: Jim Baldwin

Have you tried the basic math input palette?

POSTED BY: Gianluca Gorni
Posted 8 years ago

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

POSTED BY: ash ash
Posted 8 years ago

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

POSTED BY: ash ash
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract