Skip to content

Commit 9e4217d

Browse files
authored
fix: prevent appending empty line data in MultiLinePlot (#146)
1 parent 7479b60 commit 9e4217d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

maidr/core/plot/lineplot.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def _extract_line_data(self, plot: list[Line2D] | None) -> list[dict] | None:
9696
}
9797
for x, y in line.get_xydata() # type: ignore
9898
]
99-
100-
all_line_data.append(line_data)
99+
if len(line_data) > 0:
100+
all_line_data.append(line_data)
101101

102102
return all_line_data if all_line_data else None

0 commit comments

Comments
 (0)