I want the $ x $-axis of this plot to be $ \tau/\alpha_e $ without the "+", but I'm unable to do this without Mathematica putting the $ \alpha_e $ to the front of the string.

ListPlot[info, Frame -> True, FrameLabel -> ({"Time [" Subscript[\[Tau], e] + "/t ]", "MSD [\!\(\*SuperscriptBox[\(nm\), \(2\)]\)]"}) ]

enter image description here

  • $\begingroup$ I know the question isn't exactly the same but answers cover many approaches to the problem you have. $\endgroup$ – Kuba Sep 18 '18 at 8:43

In Wolfram, Plus (+) has no such functionality to concatenate two strings like that in Python. If you must find a counterpart, it should be StringJoin (<>).

However, one can directly typeset in Wolfram codes (which is seen more clearly in the figure below):

info = Range[8, 14];

ListPlot[info, Frame -> True, FrameLabel -> ({"Time [\[Tau]/\!\(\*SubscriptBox[\(\[Alpha]\), \\(e\)]\)]", "MSD [\!\(\*SuperscriptBox[\(nm\), \(2\)]\)]"})]

enter image description here

Though there is some confusion in the exact letters being used, the format is the same.


I realized that the stack exchange code environment cannot reflect how the typesetting is accomplished, so I made the image posted include the part of codes. But it seems not enough. It still might lead to the situation that the codes posted above let people think it somewhat troublesome to type.

Actually, it is not, as long as one knows some typesetting shortcuts in a Mathematica notebook. For example, Esc + t + Esc gives one a $ \tau $ and Ctrl + -/6 allows one to type a sub/superscript, etc. For more, please check this page Mathematical Typesetting.

| improve this answer | |
  • $\begingroup$ For those, who like me, don't like messing with low-level box forms, I suggest writing the frame label as {Row[{"Time τ/", Subscript[α, e], "]"}], Row[{"MSD [", nm^2, "]"}]}] $\endgroup$ – m_goldberg Sep 18 '18 at 11:25
  • $\begingroup$ @m_goldberg Thx for your comment! I don't like that either. And in fact I did not directly use low-level box forms at all. I will elaborate more on typesetting in update. $\endgroup$ – Αλέξανδρος Ζεγγ Sep 18 '18 at 12:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.