diff --git a/examples/lines_bars_and_markers/marker_reference.py b/examples/lines_bars_and_markers/marker_reference.py index c4564d2b027d..0c742801998b 100644 --- a/examples/lines_bars_and_markers/marker_reference.py +++ b/examples/lines_bars_and_markers/marker_reference.py @@ -60,9 +60,6 @@ def split_list(a_list): ax.plot([y] * 3, marker=marker, **marker_style) format_axes(ax) -plt.show() - - ############################################################################### # Filled markers # ============== @@ -75,8 +72,6 @@ def split_list(a_list): ax.plot([y] * 3, marker=marker, **marker_style) format_axes(ax) -plt.show() - ############################################################################### # .. _marker_fill_styles: # @@ -102,9 +97,6 @@ def split_list(a_list): ax.plot([y] * 3, fillstyle=fill_style, **filled_marker_style) format_axes(ax) -plt.show() - - ############################################################################### # Markers created from TeX symbols # ================================ @@ -128,9 +120,6 @@ def split_list(a_list): ax.plot([y] * 3, marker=marker, **marker_style) format_axes(ax) -plt.show() - - ############################################################################### # Markers created from Paths # ========================== @@ -160,8 +149,6 @@ def split_list(a_list): ax.plot([y] * 3, marker=marker, **marker_style) format_axes(ax) -plt.show() - ############################################################################### # Advanced marker modifications with transform # ============================================ @@ -197,7 +184,6 @@ def split_list(a_list): format_axes(ax) fig.tight_layout() -plt.show() ############################################################################### # Setting marker cap style and join style @@ -235,7 +221,6 @@ def split_list(a_list): ax.plot(x, y, marker=m, **marker_outer) ax.text(x, len(CapStyle) - .5, f'{theta}°', ha='center') format_axes(ax) -plt.show() ############################################################################### # Modifying the join style: diff --git a/lib/matplotlib/markers.py b/lib/matplotlib/markers.py index 91d9f64c1635..c9fc0141939d 100644 --- a/lib/matplotlib/markers.py +++ b/lib/matplotlib/markers.py @@ -217,7 +217,7 @@ class MarkerStyle: # Just used for informational purposes. is_filled() # is calculated in the _set_* functions. filled_markers = ( - 'o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', + '.', 'o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X') fillstyles = ('full', 'left', 'right', 'bottom', 'top', 'none') diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py index 4607d7872923..3922f4ecf88f 100644 --- a/lib/matplotlib/tests/test_lines.py +++ b/lib/matplotlib/tests/test_lines.py @@ -195,7 +195,11 @@ def test_marker_fill_styles(): x = np.array([0, 9]) fig, ax = plt.subplots() - for j, marker in enumerate(mlines.Line2D.filled_markers): + # This hard-coded list of markers correspond to an earlier iteration of + # MarkerStyle.filled_markers; the value of that attribute has changed but + # we kept the old value here to not regenerate the baseline image. + # Replace with mlines.Line2D.filled_markers when the image is regenerated. + for j, marker in enumerate("ov^<>8sp*hHDdPX"): for i, fs in enumerate(mlines.Line2D.fillStyles): color = next(colors) ax.plot(j * 10 + x, y + i + .5 * (j % 2),