2
$\begingroup$

If I put text in a plot as an inset, the vertical alignment of the text is normally set to the mean line of text in general. It does not matter if one writes M or m the baseline will still be aligned, even though the real center of M and m is not the same. But a bug appears if the text contains a Subscript with both a high and low character. See the following example:

ListPlot[{}, Axes -> None, Frame -> None, PlotRange -> {{-1, 1}, {-1, 1}},
 Epilog -> {Text[Style["m", Black, FontSize -> 25 pt], {-0.45, 0}, {0, 0}], 
Text[Style["M", Black, FontSize -> 25 pt], {-0.15, 0}, {0, 0}], 
Text[Style[Subscript["M", "M"], Black, FontSize -> 25 pt, SingleLetterItalics -> False], {0.15, 0}, {0, 0}], 
Text[Style[Subscript["M", "My"], Black, FontSize -> 25 pt, SingleLetterItalics -> False], {0.45, 0}, {0, 0}], 
Line[{{-1, -0.1}, {1, -0.1}}], Line[{{-1, 0.12}, {1, 0.12}}]}]

This produces the result shown below in which the last text is vertically elevated compared to the rest. Is there any possible fix for this issue?

enter image description here

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.