diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index c4707f6f7e25..f0aa06f740ba 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -412,6 +412,7 @@ def _get_gridline(self): linestyle=rcParams['grid.linestyle'], linewidth=rcParams['grid.linewidth'], alpha=rcParams['grid.alpha'], + markersize=0 ) l.set_transform(self.axes.get_xaxis_transform(which='grid')) l.get_path()._interpolation_steps = GRIDLINE_INTERPOLATION_STEPS @@ -550,6 +551,7 @@ def _get_gridline(self): linestyle=rcParams['grid.linestyle'], linewidth=rcParams['grid.linewidth'], alpha=rcParams['grid.alpha'], + markersize=0 ) l.set_transform(self.axes.get_yaxis_transform(which='grid')) diff --git a/lib/matplotlib/tests/baseline_images/test_axes/single_point.pdf b/lib/matplotlib/tests/baseline_images/test_axes/single_point.pdf index 3aed1e9a2534..1659f97d4a3e 100644 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/single_point.pdf and b/lib/matplotlib/tests/baseline_images/test_axes/single_point.pdf differ diff --git a/lib/matplotlib/tests/baseline_images/test_axes/single_point.png b/lib/matplotlib/tests/baseline_images/test_axes/single_point.png index 0ed0bb1200b6..c1aed4ff3445 100644 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/single_point.png and b/lib/matplotlib/tests/baseline_images/test_axes/single_point.png differ diff --git a/lib/matplotlib/tests/baseline_images/test_axes/single_point.svg b/lib/matplotlib/tests/baseline_images/test_axes/single_point.svg index bfee0626196e..df2eab2e2a61 100644 --- a/lib/matplotlib/tests/baseline_images/test_axes/single_point.svg +++ b/lib/matplotlib/tests/baseline_images/test_axes/single_point.svg @@ -1,7 +1,7 @@ - + - - - - +" id="m0f54036a79" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/> - + + +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +C0 0 0 0 0 0 +z +" id="m8ac445234e" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/> - - + + + +L0 -4" id="mcb557df647" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/> + + + + + + + + - + - - + + - + @@ -149,50 +167,49 @@ z - - - - + + + + + + + + - + - - - - + - + - + @@ -202,54 +219,53 @@ z - - - - + + + + + + + + - + - - - - + - + +L7.32812 8.29688 +Q12.9375 14.1094 22.625 23.8906 +Q32.3281 33.6875 34.8125 36.5312 +Q39.5469 41.8438 41.4219 45.5312 +Q43.3125 49.2188 43.3125 52.7812 +Q43.3125 58.5938 39.2344 62.25 +Q35.1562 65.9219 28.6094 65.9219 +Q23.9688 65.9219 18.8125 64.3125 +Q13.6719 62.7031 7.8125 59.4219 +L7.8125 69.3906 +Q13.7656 71.7812 18.9375 73 +Q24.125 74.2188 28.4219 74.2188 +Q39.75 74.2188 46.4844 68.5469 +Q53.2188 62.8906 53.2188 53.4219 +Q53.2188 48.9219 51.5312 44.8906 +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"/> - + @@ -259,29 +275,28 @@ Q31.1094 -20.4531 19.1875 -8.29688" id="BitstreamVeraSans-Roman-32"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -290,29 +305,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -321,29 +335,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -352,29 +365,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -385,29 +397,38 @@ L0 4" id="m9416ebf055"/> - + + + + + + + + +L4 0" id="mc8fcea1516" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/> - + - + +L-4 0" id="m0d5b0a6425" style="stroke:#000000;stroke-linecap:butt;stroke-width:0.5;"/> - + - + @@ -417,29 +438,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -449,29 +469,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -481,29 +500,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -512,29 +530,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -543,29 +560,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -574,29 +590,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -636,85 +651,65 @@ L72 231.709 z " style="fill:#ffffff;"/> - - - - - - - - - + - + - - - - + + + + + + + + - + - - - - + - + +M10.9844 1.51562 +L10.9844 10.5 +Q14.7031 8.73438 18.5 7.8125 +Q22.3125 6.89062 25.9844 6.89062 +Q35.75 6.89062 40.8906 13.4531 +Q46.0469 20.0156 46.7812 33.4062 +Q43.9531 29.2031 39.5938 26.9531 +Q35.25 24.7031 29.9844 24.7031 +Q19.0469 24.7031 12.6719 31.3125 +Q6.29688 37.9375 6.29688 49.4219 +Q6.29688 60.6406 12.9375 67.4219 +Q19.5781 74.2188 30.6094 74.2188 +Q43.2656 74.2188 49.9219 64.5156 +Q56.5938 54.8281 56.5938 36.375 +Q56.5938 19.1406 48.4062 8.85938 +Q40.2344 -1.42188 26.4219 -1.42188 +Q22.7031 -1.42188 18.8906 -0.6875 +Q15.0938 0.046875 10.9844 1.51562 +M30.6094 32.4219 +Q37.25 32.4219 41.125 36.9531 +Q45.0156 41.5 45.0156 49.4219 +Q45.0156 57.2812 41.125 61.8438 +Q37.25 66.4062 30.6094 66.4062 +Q23.9688 66.4062 20.0938 61.8438 +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"/> - + @@ -723,29 +718,28 @@ Q23.9688 -32.4219 30.6094 -32.4219" id="BitstreamVeraSans-Roman-39"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -754,67 +748,66 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + +M31.7812 34.625 +Q24.75 34.625 20.7188 30.8594 +Q16.7031 27.0938 16.7031 20.5156 +Q16.7031 13.9219 20.7188 10.1562 +Q24.75 6.39062 31.7812 6.39062 +Q38.8125 6.39062 42.8594 10.1719 +Q46.9219 13.9688 46.9219 20.5156 +Q46.9219 27.0938 42.8906 30.8594 +Q38.875 34.625 31.7812 34.625 +M21.9219 38.8125 +Q15.5781 40.375 12.0312 44.7188 +Q8.5 49.0781 8.5 55.3281 +Q8.5 64.0625 14.7188 69.1406 +Q20.9531 74.2188 31.7812 74.2188 +Q42.6719 74.2188 48.875 69.1406 +Q55.0781 64.0625 55.0781 55.3281 +Q55.0781 49.0781 51.5312 44.7188 +Q48 40.375 41.7031 38.8125 +Q48.8281 37.1562 52.7969 32.3125 +Q56.7812 27.4844 56.7812 20.5156 +Q56.7812 9.90625 50.3125 4.23438 +Q43.8438 -1.42188 31.7812 -1.42188 +Q19.7344 -1.42188 13.25 4.23438 +Q6.78125 9.90625 6.78125 20.5156 +Q6.78125 27.4844 10.7812 32.3125 +Q14.7969 37.1562 21.9219 38.8125 +M18.3125 54.3906 +Q18.3125 48.7344 21.8438 45.5625 +Q25.3906 42.3906 31.7812 42.3906 +Q38.1406 42.3906 41.7188 45.5625 +Q45.3125 48.7344 45.3125 54.3906 +Q45.3125 60.0625 41.7188 63.2344 +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"/> - + @@ -823,45 +816,44 @@ Q18.3125 -60.0625 18.3125 -54.3906" id="BitstreamVeraSans-Roman-38"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -870,29 +862,28 @@ z - - - - + + + + + + + + - + - - - - + - + - + @@ -901,29 +892,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -932,29 +922,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -965,29 +954,28 @@ L0 4" id="m9416ebf055"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -996,29 +984,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1027,29 +1014,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1058,29 +1044,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1089,29 +1074,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1120,29 +1104,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1151,29 +1134,28 @@ L-4 0" id="m560f5ef9cf"/> - - - - + + + + + + + + - + - - - - + - + - + @@ -1204,4 +1186,12 @@ L72 231.709" style="fill:none;stroke:#000000;"/> + + + + + + + + diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 194bcf9ba06f..bea08ebcd778 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -215,6 +215,10 @@ def test_fill_units(): @image_comparison(baseline_images=['single_point']) def test_single_point(): + # Issue #1796: don't let lines.marker affect the grid + matplotlib.rcParams['lines.marker'] = 'o' + matplotlib.rcParams['axes.grid'] = True + fig = plt.figure() plt.subplot( 211 ) plt.plot( [0], [0], 'o' )