diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst
index 2a89bfc7229b..26a7411f1561 100644
--- a/doc/users/whats_new.rst
+++ b/doc/users/whats_new.rst
@@ -131,6 +131,17 @@ so that search results are printed prettily:
'ytick.major.size': 4,
'ytick.minor.size': 2})
+Better vertical text alignment
+------------------------------
+
+The vertical alignment of text is now consistent across backends. You
+may see small differences in text placement, particularly with rotated
+text.
+
+If you are using a custom backend, note that the `draw_text` renderer
+method is now passed the location of the baseline, not the location of
+the bottom of the text bounding box.
+
.. _whats-new-1-2-2:
new in matplotlib 1.2.2
diff --git a/lib/matplotlib/backend_bases.py b/lib/matplotlib/backend_bases.py
index 3bc0521b767b..53555ba5caf2 100644
--- a/lib/matplotlib/backend_bases.py
+++ b/lib/matplotlib/backend_bases.py
@@ -475,7 +475,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
the x location of the text in display coords
*y*
- the y location of the text in display coords
+ the y location of the text baseline in display coords
*s*
the text string
@@ -497,7 +497,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
if 0: bbox_artist(self, renderer)
- to if 1, and then the actual bounding box will be blotted along with
+ to if 1, and then the actual bounding box will be plotted along with
your text.
"""
diff --git a/lib/matplotlib/backends/backend_agg.py b/lib/matplotlib/backends/backend_agg.py
index a21828b6d3ae..d7a81b7e8f07 100644
--- a/lib/matplotlib/backends/backend_agg.py
+++ b/lib/matplotlib/backends/backend_agg.py
@@ -154,8 +154,10 @@ def draw_mathtext(self, gc, x, y, s, prop, angle):
ox, oy, width, height, descent, font_image, used_characters = \
self.mathtext_parser.parse(s, self.dpi, prop)
- x = np.round(x + ox)
- y = np.round(y - oy)
+ xd = descent * np.sin(angle / (180.0 * np.pi))
+ yd = descent * np.cos(angle / (180.0 * np.pi))
+ x = np.round(x + ox - xd)
+ y = np.round(y - oy + yd)
self._renderer.draw_text_image(font_image, x, y + 1, angle, gc)
def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
@@ -177,10 +179,14 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
# space) in the following call to draw_text_image).
font.set_text(s, 0, flags=flags)
font.draw_glyphs_to_bitmap(antialiased=rcParams['text.antialiased'])
+ d = font.get_descent() / 64.0
+ # The descent needs to be adjusted for the angle
+ xd = d * np.sin(np.deg2rad(angle))
+ yd = d * np.cos(np.deg2rad(angle))
#print x, y, int(x), int(y), s
self._renderer.draw_text_image(
- font.get_image(), np.round(x), np.round(y) + 1, angle, gc)
+ font.get_image(), np.round(x - xd), np.round(y + yd) + 1, angle, gc)
def get_text_width_height_descent(self, s, prop, ismath):
"""
diff --git a/lib/matplotlib/backends/backend_pdf.py b/lib/matplotlib/backends/backend_pdf.py
index bec2e9137b2a..6b688cee8b10 100644
--- a/lib/matplotlib/backends/backend_pdf.py
+++ b/lib/matplotlib/backends/backend_pdf.py
@@ -1622,15 +1622,15 @@ def draw_gouraud_triangles(self, gc, points, colors, trans):
self.check_gc(gc)
self.file.output(name, Op.shading)
- def _setup_textpos(self, x, y, descent, angle, oldx=0, oldy=0, olddescent=0, oldangle=0):
+ def _setup_textpos(self, x, y, angle, oldx=0, oldy=0, oldangle=0):
if angle == oldangle == 0:
- self.file.output(x - oldx, (y + descent) - (oldy + olddescent), Op.textpos)
+ self.file.output(x - oldx, y - oldy, Op.textpos)
else:
angle = angle / 180.0 * pi
self.file.output( cos(angle), sin(angle),
-sin(angle), cos(angle),
x, y, Op.textmatrix)
- self.file.output(0, descent, Op.textpos)
+ self.file.output(0, 0, Op.textpos)
def draw_mathtext(self, gc, x, y, s, prop, angle):
# TODO: fix positioning and encoding
@@ -1660,7 +1660,7 @@ def draw_mathtext(self, gc, x, y, s, prop, angle):
fonttype = global_fonttype
if fonttype == 42 or num <= 255:
- self._setup_textpos(ox, oy, 0, 0, oldx, oldy)
+ self._setup_textpos(ox, oy, 0, oldx, oldy)
oldx, oldy = ox, oy
if (fontname, fontsize) != prev_font:
self.file.output(self.file.fontName(fontname), fontsize,
@@ -1762,7 +1762,7 @@ def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!', mtext=None):
self.file.output(elt[1], elt[2], Op.selectfont)
elif elt[0] == 'text':
curx, cury = mytrans.transform((elt[1], elt[2]))
- self._setup_textpos(curx, cury, 0, angle, oldx, oldy)
+ self._setup_textpos(curx, cury, angle, oldx, oldy)
oldx, oldy = curx, cury
if len(elt[3]) == 1:
self.file.output(elt[3][0], Op.show)
@@ -1811,13 +1811,11 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
if rcParams['pdf.use14corefonts']:
font = self._get_font_afm(prop)
l, b, w, h = font.get_str_bbox(s)
- descent = -b * fontsize / 1000
fonttype = 1
else:
font = self._get_font_ttf(prop)
self.track_characters(font, s)
font.set_text(s, 0.0, flags=LOAD_NO_HINTING)
- descent = font.get_descent() / 64.0
fonttype = rcParams['pdf.fonttype']
@@ -1857,7 +1855,7 @@ def draw_text_simple():
self.file.fontName(prop),
fontsize,
Op.selectfont)
- self._setup_textpos(x, y, descent, angle)
+ self._setup_textpos(x, y, angle)
self.file.output(self.encode_string(s, fonttype), Op.show, Op.end_text)
def draw_text_woven(chunks):
@@ -1878,7 +1876,6 @@ def draw_text_woven(chunks):
# output all the 2-byte characters.
for mode in (1, 2):
newx = oldx = 0
- olddescent = 0
# Output a 1-byte character chunk
if mode == 1:
self.file.output(Op.begin_text,
@@ -1888,10 +1885,9 @@ def draw_text_woven(chunks):
for chunk_type, chunk in chunks:
if mode == 1 and chunk_type == 1:
- self._setup_textpos(newx, 0, descent, 0, oldx, 0, olddescent, 0)
+ self._setup_textpos(newx, 0, 0, oldx, 0, 0)
self.file.output(self.encode_string(chunk, fonttype), Op.show)
oldx = newx
- olddescent = descent
lastgind = None
for c in chunk:
diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py
index 2a84c531d010..9bb02a62236c 100644
--- a/lib/matplotlib/backends/backend_pgf.py
+++ b/lib/matplotlib/backends/backend_pgf.py
@@ -643,7 +643,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
text_args.append("x=%fin" % (x * f))
text_args.append("y=%fin" % (y * f))
text_args.append("left")
- text_args.append("bottom")
+ text_args.append("base")
if angle != 0:
text_args.append("rotate=%f" % angle)
diff --git a/lib/matplotlib/backends/backend_ps.py b/lib/matplotlib/backends/backend_ps.py
index 5a829e5f877e..91b4770a9844 100644
--- a/lib/matplotlib/backends/backend_ps.py
+++ b/lib/matplotlib/backends/backend_ps.py
@@ -755,7 +755,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
#print 'text', s
lines = []
thisx = 0
- thisy = font.get_descent() / 64.0
+ thisy = 0
for c in s:
ccode = ord(c)
gind = cmap.get(ccode)
diff --git a/lib/matplotlib/backends/backend_svg.py b/lib/matplotlib/backends/backend_svg.py
index 76e5d2f94925..dad6ed060746 100644
--- a/lib/matplotlib/backends/backend_svg.py
+++ b/lib/matplotlib/backends/backend_svg.py
@@ -852,8 +852,6 @@ def _draw_text_as_path(self, gc, x, y, s, prop, angle, ismath, mtext=None):
_glyphs = text2path.get_glyphs_with_font(
font, s, glyph_map=glyph_map, return_new_glyphs_only=True)
glyph_info, glyph_map_new, rects = _glyphs
- y -= ((font.get_descent() / 64.0) *
- (prop.get_size_in_points() / text2path.FONT_SCALE))
if glyph_map_new:
writer.start(u'defs')
@@ -953,8 +951,6 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
if not ismath:
font = self._get_font(prop)
font.set_text(s, 0.0, flags=LOAD_NO_HINTING)
- descent = font.get_descent() / 64.0
- y -= descent
fontsize = prop.get_size_in_points()
@@ -982,10 +978,9 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
# to the anchor point manually for now.
angle_rad = angle * np.pi / 180.
dir_vert = np.array([np.sin(angle_rad), np.cos(angle_rad)])
- y += descent # Undo inappropriate text descent handling
v_offset = np.dot(dir_vert, [(x - ax), (y - ay)])
- ax = ax + (v_offset - descent) * dir_vert[0]
- ay = ay + (v_offset - descent) * dir_vert[1]
+ ax = ax + v_offset * dir_vert[0]
+ ay = ay + v_offset * dir_vert[1]
ha_mpl_to_svg = {'left': 'start', 'right': 'end',
'center': 'middle'}
diff --git a/lib/matplotlib/mathtext.py b/lib/matplotlib/mathtext.py
index c7fd844a5865..dafe7c369bbd 100644
--- a/lib/matplotlib/mathtext.py
+++ b/lib/matplotlib/mathtext.py
@@ -261,7 +261,7 @@ def render_rect_filled(self, x1, y1, x2, y2):
self.pswriter.write(ps)
def get_results(self, box, used_characters):
- ship(0, -self.depth, box)
+ ship(0, 0, box)
return (self.width,
self.height + self.depth,
self.depth,
@@ -288,7 +288,7 @@ def render_rect_filled(self, x1, y1, x2, y2):
self.rects.append((x1, self.height - y2, x2 - x1, y2 - y1))
def get_results(self, box, used_characters):
- ship(0, -self.depth, box)
+ ship(0, 0, box)
return (self.width,
self.height + self.depth,
self.depth,
@@ -316,7 +316,7 @@ def render_rect_filled(self, x1, y1, x2, y2):
(x1, self.height - y1 + 1, x2 - x1, y2 - y1))
def get_results(self, box, used_characters):
- ship(0, -self.depth, box)
+ ship(0, 0, box)
svg_elements = Bunch(svg_glyphs = self.svg_glyphs,
svg_rects = self.svg_rects)
return (self.width,
@@ -346,7 +346,7 @@ def render_rect_filled(self, x1, y1, x2, y2):
(x1, self.height-y2 , x2 - x1, y2 - y1))
def get_results(self, box, used_characters):
- ship(0, -self.depth, box)
+ ship(0, 0, box)
return (self.width,
self.height + self.depth,
self.depth,
@@ -374,7 +374,7 @@ def render_rect_filled(self, x1, y1, x2, y2):
(x1, y1 - self.height, x2 - x1, y2 - y1))
def get_results(self, box, used_characters):
- ship(0, -self.depth, box)
+ ship(0, 0, box)
return (self.width,
self.height + self.depth,
self.depth,
diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py
index 0daef270c766..859326673148 100644
--- a/lib/matplotlib/testing/decorators.py
+++ b/lib/matplotlib/testing/decorators.py
@@ -165,7 +165,7 @@ def do_test():
yield (do_test,)
-def image_comparison(baseline_images=None, extensions=None, tol=10,
+def image_comparison(baseline_images=None, extensions=None, tol=13,
freetype_version=None, remove_text=False,
savefig_kwarg=None):
"""
@@ -260,11 +260,11 @@ def _image_directories(func):
subdir = os.path.splitext(os.path.split(script_name)[1])[0]
else:
mods = module_name.split('.')
- mods.pop(0) # <- will be the name of the package being tested (in
+ mods.pop(0) # <- will be the name of the package being tested (in
# most cases "matplotlib")
assert mods.pop(0) == 'tests'
subdir = os.path.join(*mods)
-
+
import imp
def find_dotted_module(module_name, path=None):
"""A version of imp which can handle dots in the module name"""
@@ -273,7 +273,7 @@ def find_dotted_module(module_name, path=None):
res = _, path, _ = imp.find_module(sub_mod, path)
path = [path]
return res
-
+
mod_file = find_dotted_module(func.__module__)[1]
basedir = os.path.dirname(mod_file)
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.png b/lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.png
index 944cde0cf4b9..ca3f593f08b1 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.png and b/lib/matplotlib/tests/baseline_images/test_axes/axhspan_epoch.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.pdf b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.pdf
index 8fb03c81b1ce..7ab7ea983c96 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.png b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.png
index 987256191c6b..94b676abcd53 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.png and b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.svg b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.svg
index fecfd687d294..d13fd158f8aa 100644
--- a/lib/matplotlib/tests/baseline_images/test_axes/const_xy.svg
+++ b/lib/matplotlib/tests/baseline_images/test_axes/const_xy.svg
@@ -86,7 +86,7 @@ Q6.59375 17.9688 6.59375 36.375
Q6.59375 54.8281 13.0625 64.5156
Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
-
+
@@ -120,7 +120,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
-
+
@@ -163,7 +163,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
-
+
@@ -214,7 +214,7 @@ Q53.9062 64.0156 53.9062 55.3281
Q53.9062 49.2656 50.4375 45.0938
Q46.9688 40.9219 40.5781 39.3125" id="BitstreamVeraSans-Roman-33"/>
-
+
@@ -253,7 +253,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
-
+
@@ -298,7 +298,7 @@ Q14.8906 38.1406 10.7969 36.2812
z
" id="BitstreamVeraSans-Roman-35"/>
-
+
@@ -346,7 +346,7 @@ Q23.3906 74.2188 37.2031 74.2188
Q40.9219 74.2188 44.7031 73.4844
Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
-
+
@@ -376,7 +376,7 @@ L8.20312 64.5938
z
" id="BitstreamVeraSans-Roman-37"/>
-
+
@@ -432,7 +432,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -480,7 +480,7 @@ Q16.2188 57.2812 16.2188 49.4219
Q16.2188 41.5 20.0938 36.9531
Q23.9688 32.4219 30.6094 32.4219" id="BitstreamVeraSans-Roman-39"/>
-
+
@@ -519,7 +519,7 @@ L10.6875 0
z
" id="BitstreamVeraSans-Roman-2e"/>
-
+
@@ -540,7 +540,7 @@ z
-
+
@@ -561,7 +561,7 @@ z
-
+
@@ -582,7 +582,7 @@ z
-
+
@@ -603,7 +603,7 @@ z
-
+
@@ -624,7 +624,7 @@ z
-
+
@@ -645,7 +645,7 @@ z
-
+
@@ -712,7 +712,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -733,7 +733,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -754,7 +754,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -775,7 +775,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -796,7 +796,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -817,7 +817,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -838,7 +838,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -861,7 +861,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -879,7 +879,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -897,7 +897,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -915,7 +915,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -933,7 +933,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -951,7 +951,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -969,7 +969,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -987,7 +987,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -1005,7 +1005,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -1023,7 +1023,7 @@ L295.2 165.176" style="fill:none;stroke:#0000ff;"/>
-
+
@@ -1102,7 +1102,7 @@ z
-
+
@@ -1123,7 +1123,7 @@ z
-
+
@@ -1144,7 +1144,7 @@ z
-
+
@@ -1165,7 +1165,7 @@ z
-
+
@@ -1186,7 +1186,7 @@ z
-
+
@@ -1207,7 +1207,7 @@ z
-
+
@@ -1228,7 +1228,7 @@ z
-
+
@@ -1251,7 +1251,7 @@ z
-
+
@@ -1272,7 +1272,7 @@ z
-
+
@@ -1293,7 +1293,7 @@ z
-
+
@@ -1314,7 +1314,7 @@ z
-
+
@@ -1335,7 +1335,7 @@ z
-
+
@@ -1356,7 +1356,7 @@ z
-
+
@@ -1377,7 +1377,7 @@ z
-
+
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdf b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdf
index 8c43fd426f9f..5ed37d6d674e 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.svg b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.svg
index d060922bc37e..01fcd632c488 100644
--- a/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.svg
+++ b/lib/matplotlib/tests/baseline_images/test_axes/contour_colorbar.svg
@@ -307,16 +307,16 @@ L334.724 -351.045
L335.646 -350.647" id="C0_3_0b64afb096"/>
-
+
-
+
-
+
-
+
@@ -852,16 +852,16 @@ L72 -342.333
L72 -339.429" id="C1_3_5b394b4d1a"/>
-
+
-
+
-
+
-
+
@@ -1547,16 +1547,16 @@ L334.901 -327.812
L335.646 -327.608" id="C2_3_ae17b4891c"/>
-
+
-
+
-
+
-
+
@@ -2368,16 +2368,16 @@ L333.108 -319.099
L333.249 -319.056" id="C3_3_3b491ef200"/>
-
+
-
+
-
+
-
+
@@ -3306,16 +3306,16 @@ L333.001 -310.387
L333.249 -310.312" id="C4_3_6771376803"/>
-
+
-
+
-
+
-
+
@@ -4298,16 +4298,16 @@ L333.145 -301.674
L333.249 -301.642" id="C5_3_5064ef3c06"/>
-
+
-
+
-
+
-
+
@@ -5355,16 +5355,16 @@ L332.371 -292.961
L333.249 -292.675" id="C6_3_77f6753ea4"/>
-
+
-
+
-
+
-
+
@@ -6433,19 +6433,19 @@ L339.435 -281.345
L340.439 -281.154" id="C7_4_9aaa816a0d"/>
-
+
-
+
-
+
-
+
-
+
@@ -7568,19 +7568,19 @@ L337.721 -269.728
L338.042 -269.62" id="C8_4_e9f616b1c3"/>
-
+
-
+
-
+
-
+
-
+
@@ -8851,19 +8851,19 @@ L72 -252.303
L72 -249.398" id="C9_4_9b1df7bf25"/>
-
+
-
+
-
+
-
+
-
+
@@ -10064,10 +10064,10 @@ L424.326 -44.8733
L422.604 -43.2" id="Ca_1_1a962af47a"/>
-
+
-
+
@@ -11023,13 +11023,13 @@ L427.195 -170.985
L429.12 -169.18" id="Cb_2_5b16f07270"/>
-
+
-
+
-
+
@@ -11855,13 +11855,13 @@ L427.149 -179.697
L429.12 -177.84" id="Cc_2_66fcc6b359"/>
-
+
-
+
-
+
@@ -12567,13 +12567,13 @@ L427.401 -188.41
L429.12 -186.713" id="Cd_2_49a1a4a672"/>
-
+
-
+
-
+
@@ -13159,13 +13159,13 @@ L428.316 -197.123
L429.12 -196.251" id="Ce_2_5fd0563a93"/>
-
+
-
+
-
+
@@ -13635,10 +13635,10 @@ L428.062 -208.739
L429.12 -207.322" id="Cf_1_29e1ac70e0"/>
-
+
-
+
@@ -14020,10 +14020,10 @@ L428.951 -223.261
L429.12 -222.887" id="C10_1_c40eaea8c2"/>
-
+
-
+
@@ -14313,7 +14313,7 @@ L196.632 -201.794
L194.236 -202.48" id="C11_0_1fac15647a"/>
-
+
@@ -14533,7 +14533,7 @@ L199.029 -213.754
L196.632 -214.456" id="C12_0_18bd5390e7"/>
-
+
@@ -14628,7 +14628,7 @@ L196.388 -214.548
L196.632 -214.456" id="C13_0_9466d794f7"/>
-
+
@@ -14850,16 +14850,16 @@ L319.3 -385.896
L320.666 -388.8" id="C16_3_a20eb7a141"/>
-
+
-
+
-
+
-
+
@@ -15160,16 +15160,16 @@ L306.884 -388.145
L307.11 -388.8" id="C17_3_50f54d714e"/>
-
+
-
+
-
+
-
+
@@ -15536,16 +15536,16 @@ L295.602 -385.896
L296.439 -388.8" id="C18_3_fcde23913f"/>
-
+
-
+
-
+
-
+
@@ -15977,16 +15977,16 @@ L286.137 -385.896
L286.912 -388.8" id="C19_3_c9f505beaf"/>
-
+
-
+
-
+
-
+
@@ -16445,16 +16445,16 @@ L277.12 -385.896
L277.875 -388.8" id="C1a_3_7575f1b870"/>
-
+
-
+
-
+
-
+
@@ -16950,16 +16950,16 @@ L268.536 -387.356
L268.914 -388.8" id="C1b_3_6f7de7bc4a"/>
-
+
-
+
-
+
-
+
@@ -17465,19 +17465,19 @@ L258.949 -386.278
L259.647 -388.8" id="C1c_4_c9b745f7e3"/>
-
+
-
+
-
+
-
+
-
+
@@ -17856,13 +17856,13 @@ L427.456 -292.961
L429.12 -294.604" id="C1d_2_d0f6186d9b"/>
-
+
-
+
-
+
@@ -18177,13 +18177,13 @@ L428.365 -284.249
L429.12 -285.066" id="C1e_2_a1f4e877c3"/>
-
+
-
+
-
+
@@ -18440,10 +18440,10 @@ L428.101 -272.632
L429.12 -273.995" id="C1f_1_bd3291e6d1"/>
-
+
-
+
@@ -18654,10 +18654,10 @@ L428.974 -258.111
L429.12 -258.433" id="C20_1_648da092f8"/>
-
+
-
+
@@ -18822,7 +18822,7 @@ L198.117 -191.314
L199.029 -191.142" id="C21_0_21e6ff2f4e"/>
-
+
@@ -18955,7 +18955,7 @@ L192.945 -202.931
L194.236 -202.48" id="C22_0_79797abf35"/>
-
+
@@ -19050,7 +19050,7 @@ L196.388 -214.548
L196.632 -214.456" id="C23_0_9466d794f7"/>
-
+
@@ -19120,7 +19120,7 @@ Q53.9062 64.0156 53.9062 55.3281
Q53.9062 49.2656 50.4375 45.0938
Q46.9688 40.9219 40.5781 39.3125" id="BitstreamVeraSans-Roman-33"/>
-
+
@@ -19164,7 +19164,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
-
+
@@ -19199,7 +19199,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
-
+
@@ -19239,7 +19239,7 @@ Q6.59375 17.9688 6.59375 36.375
Q6.59375 54.8281 13.0625 64.5156
Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
-
+
@@ -19257,7 +19257,7 @@ Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
-
+
@@ -19275,7 +19275,7 @@ Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
-
+
@@ -19293,7 +19293,7 @@ Q19.5312 74.2188 31.7812 74.2188" id="BitstreamVeraSans-Roman-30"/>
-
+
@@ -19332,7 +19332,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
-
+
@@ -19377,7 +19377,7 @@ Q14.8906 38.1406 10.7969 36.2812
z
" id="BitstreamVeraSans-Roman-35"/>
-
+
@@ -19407,7 +19407,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19426,7 +19426,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19445,7 +19445,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19464,7 +19464,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19482,7 +19482,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19500,7 +19500,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19518,7 +19518,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19536,7 +19536,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19554,7 +19554,7 @@ L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0
-
+
@@ -19719,64 +19719,64 @@ L459.295 -388.8
L451.44 -373.091" id="C25_13_c1d98d161a"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -19804,25 +19804,25 @@ M451.44 -163.636
L467.149 -163.636" id="C26_6_9334fda3ec"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -19850,25 +19850,25 @@ M451.44 -373.091
L467.149 -373.091" id="C27_6_897eaf38bc"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -19930,7 +19930,7 @@ L10.6875 0
z
" id="BitstreamVeraSans-Roman-2e"/>
-
+
@@ -19946,7 +19946,7 @@ z
-
+
@@ -20000,7 +20000,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20016,7 +20016,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20032,7 +20032,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20047,7 +20047,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20062,7 +20062,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20077,7 +20077,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -20092,7 +20092,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.pdf b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.pdf
index c6554e0b258e..1ee6cb2b40d3 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.png b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.png
index baf06553f058..9ef0bac75734 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.png and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_basic.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.pdf b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.pdf
index 078388fe37fa..14b1e29ce822 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png
index f7e841efe639..33ad1f8cdaf6 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg
index 171dfd0607fd..e8d492a4e21d 100644
--- a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg
+++ b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg
@@ -56,28 +56,28 @@ M214.036 -235.468
L214.036 -310.788" id="C0_7_a6e14a349b"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -291,7 +291,7 @@ Q14.8906 38.1406 10.7969 36.2812
z
" id="BitstreamVeraSans-Roman-35"/>
-
+
@@ -312,7 +312,7 @@ z
-
+
@@ -332,7 +332,7 @@ z
-
+
@@ -368,7 +368,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
-
+
@@ -388,7 +388,7 @@ z
-
+
@@ -659,28 +659,28 @@ M442.83 -236.001
L472.225 -236.001" id="C1_7_7af960ec9d"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -814,7 +814,7 @@ z
-
+
@@ -859,7 +859,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
-
+
@@ -900,7 +900,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
-
+
@@ -950,7 +950,7 @@ Q23.3906 74.2188 37.2031 74.2188
Q40.9219 74.2188 44.7031 73.4844
Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
-
+
@@ -1008,7 +1008,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -1028,7 +1028,7 @@ Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -1263,28 +1263,28 @@ M199.339 -84.6189
L243.431 -84.6189" id="C2_7_beed771d82"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1315,28 +1315,28 @@ M214.036 -46.9584
L214.036 -159.94" id="C3_7_28f5b7da06"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1427,7 +1427,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1446,7 +1446,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1464,7 +1464,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1482,7 +1482,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1500,7 +1500,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1520,7 +1520,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1541,7 +1541,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1561,7 +1561,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1581,7 +1581,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1601,7 +1601,7 @@ L214.036 347.381" style="fill:none;stroke:#0000ff;stroke-dasharray:6.000000,6.00
-
+
@@ -1699,28 +1699,28 @@ M442.83 -66.0588
L472.225 -66.0588" id="C4_7_cbb4aa5e86"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1751,28 +1751,28 @@ M457.527 -43.2
L457.527 -147.613" id="C5_7_5c186f369a"/>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1859,7 +1859,7 @@ L-3 -1.83697e-16" id="m2f8382e997" style="stroke:#008000;stroke-linecap:butt;str
-
+
@@ -1878,7 +1878,7 @@ L-3 -1.83697e-16" id="m2f8382e997" style="stroke:#008000;stroke-linecap:butt;str
-
+
@@ -1896,7 +1896,7 @@ L-3 -1.83697e-16" id="m2f8382e997" style="stroke:#008000;stroke-linecap:butt;str
-
+
@@ -1914,7 +1914,7 @@ L-3 -1.83697e-16" id="m2f8382e997" style="stroke:#008000;stroke-linecap:butt;str
-
+
@@ -1932,7 +1932,7 @@ L-3 -1.83697e-16" id="m2f8382e997" style="stroke:#008000;stroke-linecap:butt;str
-
+
@@ -1961,7 +1961,7 @@ L4.89062 23.3906
z
" id="BitstreamVeraSans-Roman-2d"/>
-
+
@@ -1982,7 +1982,7 @@ z
-
+
@@ -2003,7 +2003,7 @@ z
-
+
@@ -2023,7 +2023,7 @@ z
-
+
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.pdf b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.pdf
index ba110173dc0c..3629ec9bed4a 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.pdf differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.png b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.png
index fc3ac3bb4e59..4a137702f3f9 100644
Binary files a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.png and b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.png differ
diff --git a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.svg b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.svg
index 3c65dde12a8a..77c50ba58156 100644
--- a/lib/matplotlib/tests/baseline_images/test_axes/fill_units.svg
+++ b/lib/matplotlib/tests/baseline_images/test_axes/fill_units.svg
@@ -261,7 +261,7 @@ L10.6875 0
z
" id="BitstreamVeraSans-Roman-2e"/>
-
+
@@ -297,7 +297,7 @@ L12.4062 0
z
" id="BitstreamVeraSans-Roman-31"/>
-
+
@@ -343,7 +343,7 @@ Q49.8594 40.875 45.4062 35.4062
Q44.1875 33.9844 37.6406 27.2188
Q31.1094 20.4531 19.1875 8.29688" id="BitstreamVeraSans-Roman-32"/>
-
+
@@ -397,7 +397,7 @@ Q53.9062 64.0156 53.9062 55.3281
Q53.9062 49.2656 50.4375 45.0938
Q46.9688 40.9219 40.5781 39.3125" id="BitstreamVeraSans-Roman-33"/>
-
+
@@ -439,7 +439,7 @@ L4.89062 26.7031
z
" id="BitstreamVeraSans-Roman-34"/>
-
+
@@ -487,7 +487,7 @@ Q14.8906 38.1406 10.7969 36.2812
z
" id="BitstreamVeraSans-Roman-35"/>
-
+
@@ -538,7 +538,7 @@ Q23.3906 74.2188 37.2031 74.2188
Q40.9219 74.2188 44.7031 73.4844
Q48.4844 72.75 52.5938 71.2969" id="BitstreamVeraSans-Roman-36"/>
-
+
@@ -571,7 +571,7 @@ L8.20312 64.5938
z
" id="BitstreamVeraSans-Roman-37"/>
-
+
@@ -630,7 +630,7 @@ Q38.1406 66.4062 31.7812 66.4062
Q25.3906 66.4062 21.8438 63.2344
Q18.3125 60.0625 18.3125 54.3906" id="BitstreamVeraSans-Roman-38"/>
-
+
@@ -681,7 +681,7 @@ Q16.2188 57.2812 16.2188 49.4219
Q16.2188 41.5 20.0938 36.9531
Q23.9688 32.4219 30.6094 32.4219" id="BitstreamVeraSans-Roman-39"/>
-
+
@@ -774,7 +774,7 @@ L54.3906 54.6875
z
" id="BitstreamVeraSans-Roman-67"/>
-
+
@@ -997,7 +997,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1017,7 +1017,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1038,7 +1038,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1059,7 +1059,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1080,7 +1080,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1101,7 +1101,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1122,7 +1122,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1143,7 +1143,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1164,7 +1164,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1185,7 +1185,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1195,7 +1195,7 @@ M315.491 165.382" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1275,7 +1275,7 @@ L11.7188 39.3125
z
" id="BitstreamVeraSans-Roman-3a"/>
-
+
@@ -1300,7 +1300,7 @@ z
-
+
@@ -1325,7 +1325,7 @@ z
-
+
@@ -1350,7 +1350,7 @@ z
-
+
@@ -1375,7 +1375,7 @@ z
-
+
@@ -1400,7 +1400,7 @@ z
-
+
@@ -1425,7 +1425,7 @@ z
-
+
@@ -1450,7 +1450,7 @@ z
-
+
@@ -1475,7 +1475,7 @@ z
-
+
@@ -1500,7 +1500,7 @@ z
-
+
@@ -1525,7 +1525,7 @@ z
-
+
@@ -1550,7 +1550,7 @@ z
-
+
@@ -1575,7 +1575,7 @@ z
-
+
@@ -1617,7 +1617,7 @@ L-0.296875 64.5938
z
" id="BitstreamVeraSans-Roman-54"/>
-
+
@@ -1637,7 +1637,7 @@ z
-
+
@@ -1657,7 +1657,7 @@ z
-
+
@@ -1678,7 +1678,7 @@ z
-
+
@@ -1699,7 +1699,7 @@ z
-
+
@@ -1720,7 +1720,7 @@ z
-
+
@@ -1741,7 +1741,7 @@ z
-
+
@@ -1762,7 +1762,7 @@ z
-
+
@@ -1783,7 +1783,7 @@ z
-
+
@@ -1804,7 +1804,7 @@ z
-
+
@@ -1825,7 +1825,7 @@ z
-
+
@@ -1835,7 +1835,7 @@ z
-
+
@@ -1900,7 +1900,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1925,7 +1925,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1950,7 +1950,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -1975,7 +1975,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2000,7 +2000,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2025,7 +2025,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2050,7 +2050,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2075,7 +2075,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2100,7 +2100,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2125,7 +2125,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2150,7 +2150,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2175,7 +2175,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2200,7 +2200,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2214,7 +2214,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2234,7 +2234,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2254,7 +2254,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2275,7 +2275,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2296,7 +2296,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2317,7 +2317,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+
@@ -2338,7 +2338,7 @@ M315.491 330.327" style="fill:none;stroke:#ff0000;"/>
-
+