diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 938cbefa5bc5..61d1eef82cb9 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2923,9 +2923,9 @@ def xywhere(xs, ys, mask): barcols.append(self.hlines(yo, lo, ro, **lines_kw)) rightup, yup = xywhere(right, y, xlolims & everymask) if self.xaxis_inverted(): - marker = mlines.CARETLEFT + marker = mlines.CARETLEFTBASE else: - marker = mlines.CARETRIGHT + marker = mlines.CARETRIGHTBASE caplines.extend( self.plot(rightup, yup, ls='None', marker=marker, **plot_kw)) @@ -2939,9 +2939,9 @@ def xywhere(xs, ys, mask): barcols.append(self.hlines(yo, lo, ro, **lines_kw)) leftlo, ylo = xywhere(left, y, xuplims & everymask) if self.xaxis_inverted(): - marker = mlines.CARETRIGHT + marker = mlines.CARETRIGHTBASE else: - marker = mlines.CARETLEFT + marker = mlines.CARETLEFTBASE caplines.extend( self.plot(leftlo, ylo, ls='None', marker=marker, **plot_kw)) @@ -2987,9 +2987,9 @@ def xywhere(xs, ys, mask): barcols.append(self.vlines(xo, lo, uo, **lines_kw)) xup, upperup = xywhere(x, upper, lolims & everymask) if self.yaxis_inverted(): - marker = mlines.CARETDOWN + marker = mlines.CARETDOWNBASE else: - marker = mlines.CARETUP + marker = mlines.CARETUPBASE caplines.extend( self.plot(xup, upperup, ls='None', marker=marker, **plot_kw)) @@ -3003,9 +3003,9 @@ def xywhere(xs, ys, mask): barcols.append(self.vlines(xo, lo, uo, **lines_kw)) xlo, lowerlo = xywhere(x, lower, uplims & everymask) if self.yaxis_inverted(): - marker = mlines.CARETUP + marker = mlines.CARETUPBASE else: - marker = mlines.CARETDOWN + marker = mlines.CARETDOWNBASE caplines.extend( self.plot(xlo, lowerlo, ls='None', marker=marker, **plot_kw)) diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index cba5d6f04b84..5e65ce1356d3 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -30,7 +30,9 @@ # Imported here for backward compatibility, even though they don't # really belong. from matplotlib.markers import TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN -from matplotlib.markers import CARETLEFT, CARETRIGHT, CARETUP, CARETDOWN +from matplotlib.markers import ( + CARETLEFT, CARETRIGHT, CARETUP, CARETDOWN, + CARETLEFTBASE, CARETRIGHTBASE, CARETUPBASE, CARETDOWNBASE) def segment_hits(cx, cy, x, y, radius): diff --git a/lib/matplotlib/markers.py b/lib/matplotlib/markers.py index 8eef2ae20ebd..2310e6dc3fcd 100644 --- a/lib/matplotlib/markers.py +++ b/lib/matplotlib/markers.py @@ -35,10 +35,13 @@ TICKRIGHT tickright TICKUP tickup TICKDOWN tickdown -CARETLEFT caretleft -CARETRIGHT caretright -CARETUP caretup -CARETDOWN caretdown +CARETLEFT caretleft (centered at tip) +CARETRIGHT caretright (centered at tip) +CARETUP caretup (centered at tip) +CARETDOWN caretdown (centered at tip) +CARETLEFTBASE caretleft (centered at base) +CARETRIGHTBASE caretright (centered at base) +CARETUPBASE caretup (centered at base) "None" nothing None nothing " " nothing @@ -91,7 +94,8 @@ # special-purpose marker identifiers: (TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN, - CARETLEFT, CARETRIGHT, CARETUP, CARETDOWN) = list(xrange(8)) + CARETLEFT, CARETRIGHT, CARETUP, CARETDOWN, + CARETLEFTBASE, CARETRIGHTBASE, CARETUPBASE, CARETDOWNBASE) = list(xrange(12)) class MarkerStyle(object): @@ -128,6 +132,10 @@ class MarkerStyle(object): CARETRIGHT: 'caretright', CARETUP: 'caretup', CARETDOWN: 'caretdown', + CARETLEFTBASE: 'caretleftbase', + CARETRIGHTBASE: 'caretrightbase', + CARETUPBASE: 'caretupbase', + CARETDOWNBASE: 'caretdownbase', "None": 'nothing', None: 'nothing', ' ': 'nothing', @@ -779,6 +787,36 @@ def _set_caretright(self): self._path = self._caret_path self._joinstyle = 'miter' + _caret_path_base = Path([[-1.0, 0.0], [0.0, -1.5], [1.0, 0]]) + + def _set_caretdownbase(self): + self._transform = Affine2D().scale(0.5) + self._snap_threshold = 3.0 + self._filled = False + self._path = self._caret_path_base + self._joinstyle = 'miter' + + def _set_caretupbase(self): + self._transform = Affine2D().scale(0.5).rotate_deg(180) + self._snap_threshold = 3.0 + self._filled = False + self._path = self._caret_path_base + self._joinstyle = 'miter' + + def _set_caretleftbase(self): + self._transform = Affine2D().scale(0.5).rotate_deg(270) + self._snap_threshold = 3.0 + self._filled = False + self._path = self._caret_path_base + self._joinstyle = 'miter' + + def _set_caretrightbase(self): + self._transform = Affine2D().scale(0.5).rotate_deg(90) + self._snap_threshold = 3.0 + self._filled = False + self._path = self._caret_path_base + self._joinstyle = 'miter' + _x_path = Path([[-1.0, -1.0], [1.0, 1.0], [-1.0, 1.0], [1.0, -1.0]], [Path.MOVETO, Path.LINETO, diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.pdf b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.pdf index 30036fa5f637..25dee19e746c 100644 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.png b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.png index b6e015a48efb..9a8e1067d0fc 100644 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.png and b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.svg b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.svg index c217021aa9a4..5950b3eda312 100644 --- a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.svg +++ b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_limits.svg @@ -27,338 +27,338 @@ z " style="fill:#ffffff;"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -366,70 +366,70 @@ L 234.327273 118.705179 +" id="ma827888171" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + +" id="madc29dcfa5" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - +" id="m99d2f0a5e6" style="stroke:#008000;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + +" id="m519b25ee94" style="stroke:#008000;stroke-width:0.500000;"/> - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - + + + + - - - - + + + + - +" id="mc2ec70c08e" style="stroke:#ff0000;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + +" id="m7d4b7394d5" style="stroke:#ff0000;stroke-width:0.500000;"/> - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - + + + + - - - - + + + + - +" id="m9c6b21c7dd" style="stroke:#ff00ff;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + +" id="mc3ac74f800" style="stroke:#ff00ff;stroke-width:0.500000;"/> - - - - - + + + + + - - - - - + + + + + - + - - - - + + + + - - - - + + + + - + - - - - + + + + - - - - + + + + - +" id="m78b73e4f9e" style="stroke:#000000;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - + - - - - + + + + - + - - - - + + + + - + - - + + - + - - + + @@ -819,19 +819,19 @@ C -3.578535 -2.078319 -4 -1.060812 -4 0 C -4 1.060812 -3.578535 2.078319 -2.828427 2.828427 C -2.078319 3.578535 -1.060812 4 0 4 z -" id="mdcc3c2ddd6" style="stroke:#0000ff;stroke-width:0.500000;"/> +" id="m49a3d2d9af" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + @@ -860,20 +860,20 @@ L 518.4 43.2 +" id="m6252f7b7eb" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="mc9c6c285cf" style="stroke:#000000;stroke-width:0.500000;"/> - + @@ -907,12 +907,12 @@ Q 19.53125 74.21875 31.78125 74.21875 - + - + @@ -940,12 +940,12 @@ z - + - + @@ -983,12 +983,12 @@ Q 31.109375 20.453125 19.1875 8.296875 - + - + @@ -1034,12 +1034,12 @@ Q 46.96875 40.921875 40.578125 39.3125 - + - + @@ -1071,12 +1071,12 @@ z - + - + @@ -1119,20 +1119,20 @@ z +" id="mc378de4433" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="ma4f787a4c9" style="stroke:#000000;stroke-width:0.500000;"/> - + @@ -1162,12 +1162,12 @@ z - + - + @@ -1182,12 +1182,12 @@ z - + - + @@ -1202,12 +1202,12 @@ z - + - + @@ -1222,12 +1222,12 @@ z - + - + @@ -1242,12 +1242,12 @@ z - + - + @@ -1262,12 +1262,12 @@ z - + - + @@ -1282,12 +1282,12 @@ z - + - + @@ -1666,7 +1666,7 @@ Q 40.578125 54.546875 44.28125 53.078125 - + 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 d7b29e940058..be9353c223a4 100644 --- a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg +++ b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_mixed.svg @@ -27,28 +27,28 @@ z " style="fill:#ffffff;"/> - - - - - - - - @@ -56,29 +56,29 @@ L 214.036364 121.211578 +" id="mfa88964a34" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + @@ -93,17 +93,17 @@ C -2.683901 -1.55874 -3 -0.795609 -3 0 C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 C -1.55874 2.683901 -0.795609 3 0 3 z -" id="m88a2383015" style="stroke:#000000;stroke-width:0.500000;"/> +" id="mb6e84590ae" style="stroke:#000000;stroke-width:0.500000;"/> - - - - - - - - - + + + + + + + + + @@ -132,68 +132,68 @@ L 274.909091 43.2 +" id="mc9acf5ec22" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="m1cc15a693a" style="stroke:#000000;stroke-width:0.500000;"/> - + - + - + - + - + - + - + - + - + @@ -204,20 +204,20 @@ L 0 4 +" id="m1d0ad5c632" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="m6040a52d0d" style="stroke:#000000;stroke-width:0.500000;"/> - + @@ -290,12 +290,12 @@ z - + - + @@ -310,12 +310,12 @@ z - + - + @@ -330,12 +330,12 @@ z - + - + @@ -365,12 +365,12 @@ z - + - + @@ -591,28 +591,28 @@ z " style="fill:#ffffff;"/> - - - - - - - - @@ -620,29 +620,29 @@ L 472.224823 195.998601 +" id="m35294528ed" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + @@ -657,17 +657,17 @@ C -2.683901 -1.55874 -3 -0.795609 -3 0 C -3 0.795609 -2.683901 1.55874 -2.12132 2.12132 C -1.55874 2.683901 -0.795609 3 0 3 z -" id="m83c6693b27" style="stroke:#000000;stroke-width:0.500000;"/> +" id="m203a6b5dc5" style="stroke:#000000;stroke-width:0.500000;"/> - - - - - - - - - + + + + + + + + + @@ -694,60 +694,60 @@ L 518.4 43.2 - + - + - + - + - + - + - + - + - + - + @@ -756,12 +756,12 @@ L 518.4 43.2 - + - + @@ -776,12 +776,12 @@ L 518.4 43.2 - + - + @@ -821,12 +821,12 @@ Q 31.109375 20.453125 19.1875 8.296875 - + - + @@ -860,12 +860,12 @@ z - + - + @@ -910,12 +910,12 @@ Q 48.484375 72.75 52.59375 71.296875 - + - + @@ -968,12 +968,12 @@ Q 18.3125 60.0625 18.3125 54.390625 - + - + @@ -1160,54 +1160,54 @@ z " style="fill:#ffffff;"/> - - - - - - - - - - - - - - - - @@ -1215,57 +1215,57 @@ L 214.036364 272.060219 +" id="mf2c81429d7" style="stroke:#0000ff;stroke-width:0.500000;"/> - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - + + + + + + + + + @@ -1309,12 +1309,12 @@ L 274.909091 231.709091 - + - + @@ -1328,12 +1328,12 @@ L 274.909091 231.709091 - + - + @@ -1346,12 +1346,12 @@ L 274.909091 231.709091 - + - + @@ -1364,12 +1364,12 @@ L 274.909091 231.709091 - + - + @@ -1382,12 +1382,12 @@ L 274.909091 231.709091 - + - + @@ -1402,12 +1402,12 @@ L 274.909091 231.709091 - + - + @@ -1423,12 +1423,12 @@ L 274.909091 231.709091 - + - + @@ -1443,12 +1443,12 @@ L 274.909091 231.709091 - + - + @@ -1463,12 +1463,12 @@ L 274.909091 231.709091 - + - + @@ -1483,12 +1483,12 @@ L 274.909091 231.709091 - + - + @@ -1542,54 +1542,54 @@ z " style="fill:#ffffff;"/> - - - - - - - - - - - - - - - - @@ -1597,70 +1597,70 @@ L 457.527273 284.387119 +" id="me561bad199" style="stroke:#008000;stroke-width:2.000000;"/> - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + +" id="m0e3bf9684d" style="stroke:#008000;stroke-width:2.000000;"/> - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - + + + + + + + + + @@ -1687,12 +1687,12 @@ L 518.4 231.709091 - + - + @@ -1706,12 +1706,12 @@ L 518.4 231.709091 - + - + @@ -1724,12 +1724,12 @@ L 518.4 231.709091 - + - + @@ -1742,12 +1742,12 @@ L 518.4 231.709091 - + - + @@ -1760,12 +1760,12 @@ L 518.4 231.709091 - + - + @@ -1780,12 +1780,12 @@ L 518.4 231.709091 - + - + @@ -1809,12 +1809,12 @@ z - + - + @@ -1830,12 +1830,12 @@ z - + - + @@ -1850,12 +1850,12 @@ z - + - + @@ -1872,296 +1872,296 @@ z +" id="m868fd82832" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="md0093308e3" style="stroke:#000000;stroke-width:0.500000;"/> - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -2327,16 +2327,16 @@ z - + - + - + - + diff --git a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_zorder.svg b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_zorder.svg index bc60095d9d02..146387c97bc9 100644 --- a/lib/matplotlib/tests/baseline_images/test_axes/errorbar_zorder.svg +++ b/lib/matplotlib/tests/baseline_images/test_axes/errorbar_zorder.svg @@ -27,32 +27,32 @@ z " style="fill:#ffffff;"/> - - - - - - @@ -82,20 +82,20 @@ L 518.4 43.2 +" id="mde0b6263f6" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="me050744a6f" style="stroke:#000000;stroke-width:0.500000;"/> - + @@ -129,12 +129,12 @@ Q 19.53125 74.21875 31.78125 74.21875 - + - + @@ -162,12 +162,12 @@ z - + - + @@ -205,12 +205,12 @@ Q 31.109375 20.453125 19.1875 8.296875 - + - + @@ -256,12 +256,12 @@ Q 46.96875 40.921875 40.578125 39.3125 - + - + @@ -293,12 +293,12 @@ z - + - + @@ -337,12 +337,12 @@ z - + - + @@ -385,12 +385,12 @@ Q 48.484375 72.75 52.59375 71.296875 - + - + @@ -414,12 +414,12 @@ z - + - + @@ -470,12 +470,12 @@ Q 18.3125 60.0625 18.3125 54.390625 - + - + @@ -522,20 +522,20 @@ Q 23.96875 32.421875 30.609375 32.421875 +" id="m0a339cee7a" style="stroke:#000000;stroke-width:0.500000;"/> - + +" id="mbb69401d53" style="stroke:#000000;stroke-width:0.500000;"/> - + @@ -558,12 +558,12 @@ z - + - + @@ -577,12 +577,12 @@ z - + - + @@ -595,12 +595,12 @@ z - + - + @@ -613,12 +613,12 @@ z - + - + @@ -631,12 +631,12 @@ z - - @@ -868,44 +868,44 @@ Q 40.578125 54.546875 44.28125 53.078125 - - - - - - - - - - - - @@ -913,37 +913,37 @@ L 518.4 60.48 +" id="mb381991beb" style="stroke:#ff0000;stroke-width:0.500000;"/> - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - + diff --git a/lib/matplotlib/tests/baseline_images/test_axes/marker_styles.png b/lib/matplotlib/tests/baseline_images/test_axes/marker_styles.png index 4a713d58542a..e8be480e4ca7 100644 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/marker_styles.png and b/lib/matplotlib/tests/baseline_images/test_axes/marker_styles.png differ