Skip to content

Commit

Permalink
Drop NA inside lineplot
Browse files Browse the repository at this point in the history
Narrowly fixes #2272

But would like a broader solution here that also addresses #1552
  • Loading branch information
mwaskom committed Dec 4, 2020
1 parent 1a9d417 commit ed99061
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions seaborn/relational.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ def plot(self, ax, kws):
sort_cols = [var for var in sort_vars if var in self.variables]
sub_data = sub_data.sort_values(sort_cols)

# TODO
# How to handle NA? We don't want NA to propagate through to the
# estimate/CI when some values are present, but we would also like
# matplotlib to show "gaps" in the line when all values are missing.
# This is straightforward absent aggregation, but complicated with it.
sub_data = sub_data.dropna()

# Due to the original design, code below was written assuming that
# sub_data always has x, y, and units columns, which may be empty.
# Adding this here to avoid otherwise disruptive changes, but it
Expand Down

0 comments on commit ed99061

Please sign in to comment.