Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42786e3

Browse files
committed
Avoid comparing numpy array to string when marker is an array
1 parent abcef5a commit 42786e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/matplotlib/lines.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,13 @@ def draw(self, renderer):
840840
marker_path = marker.get_path()
841841
marker_trans = marker.get_transform()
842842
w = renderer.points_to_pixels(self._markersize)
843-
if marker.get_marker() != ',':
843+
844+
if (is_string_like(marker.get_marker()) and
845+
marker.get_marker() == ','):
846+
gc.set_linewidth(0)
847+
else:
844848
# Don't scale for pixels, and don't stroke them
845849
marker_trans = marker_trans.scale(w)
846-
else:
847-
gc.set_linewidth(0)
848850

849851
renderer.draw_markers(gc, marker_path, marker_trans,
850852
subsampled, affine.frozen(),

0 commit comments

Comments
 (0)