File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -211,21 +211,22 @@ def draw_pathcollection(data, obj):
211
211
212
212
# "solution" from
213
213
# <https://github.com/matplotlib/matplotlib/issues/4672#issuecomment-378702670>
214
- p = obj .get_paths ()[0 ]
215
- ms = {style : MarkerStyle (style ) for style in MarkerStyle .markers }
216
- paths = {
217
- style : marker .get_path ().transformed (marker .get_transform ())
218
- for style , marker in ms .items ()
219
- }
220
214
marker0 = None
221
- for marker , path in paths .items ():
222
- if (
223
- np .array_equal (path .codes , p .codes )
224
- and (path .vertices .shape == p .vertices .shape )
225
- and np .max (np .abs (path .vertices - p .vertices )) < 1.0e-10
226
- ):
227
- marker0 = marker
228
- break
215
+ if obj .get_paths ():
216
+ p = obj .get_paths ()[0 ]
217
+ ms = {style : MarkerStyle (style ) for style in MarkerStyle .markers }
218
+ paths = {
219
+ style : marker .get_path ().transformed (marker .get_transform ())
220
+ for style , marker in ms .items ()
221
+ }
222
+ for marker , path in paths .items ():
223
+ if (
224
+ np .array_equal (path .codes , p .codes )
225
+ and (path .vertices .shape == p .vertices .shape )
226
+ and np .max (np .abs (path .vertices - p .vertices )) < 1.0e-10
227
+ ):
228
+ marker0 = marker
229
+ break
229
230
230
231
is_contour = len (dd ) == 1
231
232
if is_contour :
You can’t perform that action at this time.
0 commit comments