1

For my masters thesis I need plots of squared Bessel Processes, but I can't get the axis lables right. I want the y-axis to be labeled $$\left(R_s^{(n)}\right)^2$$ but I have not been able to get the big parentheses in the right position. The best I have accomplished is this:

ListLinePlot[{matris1, matris2, matris3}, ImageSize -> Large, 
 AxesLabel -> {t, 
   SuperscriptBox["(" Subscript[R, t]^"(n)" ")", 2] // DisplayForm}]

which gives this plot enter image description here

As you can see the parentheses are in the wrong place. Any ideas on how to get it right?

Alexey Popkov
  • 61,809
  • 7
  • 149
  • 368
a.s
  • 13
  • 3

1 Answers1

2

This may be close enough. If you really need to dial it in consider LaTeX.

RowBox[{"(", SubsuperscriptBox["R", "s", "(n)"], ")"}]^2 // 
  DisplayForm // TraditionalForm

enter image description here

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
  • 1
    I prefer using RawBoxes instead of DisplayForm, but of course that requires that you use valid boxes, which I think is a good thing. – Carl Woll Jun 06 '17 at 07:40
  • @CarlWoll Good tip. I know about RawBoxes but I have a hard time breaking old habits, including DisplayForm. DisplayForm does work with mixed forms however which I had seen as a convenience. Do I infer correctly that you recommend avoiding e.g. RowBox[{"(", Subsuperscript["R", "s", "(n)"], ")"}]^2 // DisplayForm (with Subsuperscript rather than SubsuperscriptBox)? – Mr.Wizard Jun 06 '17 at 08:28
  • 1
    Yes, I don't like mixing expressions and boxes. Many times I have to fix bugs where somebody uses a mixture of expressions and boxes that don't work. One example: what should DisplayForm["a"]//TraditionalForm look like? Should it be italicized or not? – Carl Woll Jun 06 '17 at 08:30