Skip to content

Commit 625722a

Browse files
authored
Lines that aren't in the legend should have their colors skipped
I'm not positive how stable the "_linexxx" format is for lines that aren't shown in mpl, but this fixes my current issue.
1 parent 0a362a2 commit 625722a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

matplotlib2tikz/line2d.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def draw_line2d(data, obj):
8989

9090
if marker and not show_line:
9191
addplot_options.append('only marks')
92+
93+
if obj.get_label().startswith("_line"):
94+
addplot_options.append("forget plot")
9295

9396
# process options
9497
content.append('\\addplot ')

0 commit comments

Comments
 (0)