I'd like to get something like that: $E^{\alpha}_{\beta}$, where there are simutaneous subscript \beta and superscript \alpha for the symbol E. I type in matplotlib (1.2.x with python 2.7.1) the following code:
ax.text(0.,0.,r'E$^{\alpha}_{\beta}$')
and I get an error message:
Subscript/superscript sequence is too long. Use braces { } to remove ambiguity.
When I added extra braces to separate the superscript and subscript like
ax.text(0.,0.,r'E${^{\alpha}}_{\beta}$')
matplotlib can handle it this time, but the result is not a SIMULTANEOUS superscript and subscript, it seems the symbol E$^{\alpha}$ with a subscript \beta, where \alpha and \beta are not vertically aligned.
MatPlotLib with PythonUse xlabel and ylabel with subscripts in the text. Use the legend() method to place a legend in the plot. Adjust the padding between and around subplots. To display the figure, use the show() method.
Move your E
into the TeX so that the processor knows what alpha
and beta
are hanging off of:
text(0.25, 0.5, r'$E^{\alpha}_{\beta}$', size=200)
produces
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With