Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix for marker verts bug
  • Loading branch information
lkilcher committed Jan 30, 2017
commit 4b7ad543e0f54f6473ccce5f7aab1f83d1f31405
7 changes: 4 additions & 3 deletions lib/matplotlib/markers.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,12 @@ def get_marker(self):
return self._marker

def set_marker(self, marker):
if (isinstance(marker, Sized) and len(marker) in (2, 3) and
if (isinstance(marker, np.ndarray) and marker.ndim == 2 and
marker.shape[1] == 2):
self._marker_function = self._set_vertices
elif (isinstance(marker, Sized) and len(marker) in (2, 3) and
marker[1] in (0, 1, 2, 3)):
self._marker_function = self._set_tuple_marker
elif isinstance(marker, np.ndarray):
self._marker_function = self._set_vertices
elif not isinstance(marker, list) and marker in self.markers:
self._marker_function = getattr(
self, '_set_' + self.markers[marker])
Expand Down