-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Rogue mathtext rendered spaces #4333
Copy link
Copy link
Closed
Description
I'm aware that the built in mathtext rendered is not expected to be perfectly identical to tex, but I'm seeing some egregious behavior with spacing that I cannot seem to explain. With:
import matplotlib.pyplot as plt
plt.figure()
plt.figtext(0.1, 0.9, r"1. ($a^2$)", size=20)
plt.figtext(0.1, 0.8, r"2. $(a^2)$", size=20)
plt.figtext(0.1, 0.7, r"3. $\left(a^2\right)$", size=20)
plt.show()
In both 1.4.2 and a recent development version I get a rogue space before the bracket in all three cases:

Compared with turning text.usetex on:

Using a negative space (\!) fixes the issue rendering with matplotlib, but screws up the latex output.
Reactions are currently unavailable