Skip to content

Commit c64eae3

Browse files
committed
Legend fix for None-handles
1 parent 544c544 commit c64eae3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

proplot/wrappers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,9 +2198,11 @@ def legend_wrapper(self,
21982198
self.add_artist(leg)
21992199
leg.legendPatch.update(outline) # or get_frame()
22002200
for obj in leg.legendHandles:
2201-
obj.update(kw_handle)
2201+
if isinstance(obj, martist.Artist):
2202+
obj.update(kw_handle)
22022203
for obj in leg.get_texts():
2203-
obj.update(kw_text)
2204+
if isinstance(obj, martist.Artist):
2205+
obj.update(kw_text)
22042206
# Draw manual fancy bounding box for un-aligned legend
22052207
# WARNING: The matplotlib legendPatch transform is the default transform,
22062208
# i.e. universal coordinates in points. Means we have to transform

0 commit comments

Comments
 (0)