diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 669f72030f7a..72a6d50474cf 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -1282,7 +1282,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None): etc. ===== ===================== """ - if aspect in ('equal', 'auto'): + if cbook.is_string_like(aspect) and aspect in ('equal', 'auto'): self._aspect = aspect else: self._aspect = float(aspect) # raise ValueError if necessary diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 5e9435a38ac2..1310c080b085 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -840,11 +840,13 @@ def draw(self, renderer): marker_path = marker.get_path() marker_trans = marker.get_transform() w = renderer.points_to_pixels(self._markersize) - if marker.get_marker() != ',': + + if (is_string_like(marker.get_marker()) and + marker.get_marker() == ','): + gc.set_linewidth(0) + else: # Don't scale for pixels, and don't stroke them marker_trans = marker_trans.scale(w) - else: - gc.set_linewidth(0) renderer.draw_markers(gc, marker_path, marker_trans, subsampled, affine.frozen(),