Skip to content

Commit 7852e3c

Browse files
authored
Update _patch.py
fix bug : when obj._transforms is an empty array , throw "ZeroDivisionError" exception.
1 parent 372eaa4 commit 7852e3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tikzplotlib/_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _patch_legend(obj, draw_options, legend_type):
6464
def zip_modulo(*seqs):
6565
n = max(len(seq) for seq in seqs)
6666
for i in range(n):
67-
yield tuple(seq[i % len(seq)] for seq in seqs)
67+
yield tuple((seq[i % len(seq)] if len(seq)!=0 else None) for seq in seqs)
6868

6969

7070
def draw_patchcollection(data, obj):

0 commit comments

Comments
 (0)