Hello everyone, I frequently use subscripts and superscripts in text on my plots, but I've noticed that the line and character spacing (kerning ?) is not always as I would expect. For most things, this is not a problem. However, I would occasionally like various text objects to line up with one another, and at these times, this spacing difference can become a issue.
I guess I have a couple questions at this point... First, is this expected? Second, is there any (simple) way I can control the line and character spacing? I see there is a 'linespacing' keyword argument; however, this seems to be a multiplier relative to the total text height for each line not an absolute, fixed height of every line. For character spacing, is there a special symbol I could insert to add or removing spacing between characters? I'm using Matploblib 1.0.0 that ships with Python(x,y) for Windows. Below is a test script that highlights these differences (at least on my system). Any help or suggestions are most appreciated. (I don't know much TeX, so I appologize if these differences are obvious for those in the know.) Ryan import matplotlib.pyplot as plt plt.rc('font', size=25.0) plt.text(0.25, 0.25, 'X1Y2\nX1Y2\nX$_1$Y$_2$\nX$_{1}$Y$_{2}$\n$X_1Y_2$\n$X_{1}Y_{2}$') plt.text(0.75, 0.25, 'X1Y2\nX1Y2\nX$^1$Y$^2$\nX$^{1}$Y$^{2}$\n$X^1Y^2$\n$X^{1}Y^{2}$') plt.text(0.5, 0.25, 'X$_{1}$Y$_{2}$\nX$^{1}$Y$^{2}$\n$X_1Y_2$\n$X^1Y^2$') plt.show() ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users