Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
One of the improvements to matplotlib 1.3.0 is supposed to be improved vertical alignment of text, but it appears to have gotten worse in my experience. Here is an example:
import matplotlib.pylab as pltmpl.rcParams['font.size'] = 24fig = plt.figure(figsize = (5,5))ax = plt.subplot(111)ax.plot([0,1], [0,1])txts = ['1', '2', '3']y_coords = [0.8, 0.5, 0.2]for txt, y_coord in zip(txts, y_coords): ax.annotate(txt, xy = (0.25, y_coord), fontname = 'Helvetica', \ size=36, va='center', ha='center', \ bbox=dict(boxstyle='square', fc = 'w'))plt.savefig('Test.png', bbox_inches = 'tight', pad_inches = 0)
In matplotlib 1.2.1 the png looks like this
but in matplotlib 1.3.0 the png looks like this
The numbers in the the v1.3.0 png are too high. The numbers should be in the center of the rectangular boxes, and the center of the tick mark numbers should line up with the tick marks.