Skip to content

Commit

Permalink
fix: sort by value by as well if not none
Browse files Browse the repository at this point in the history
  • Loading branch information
singjc committed Jan 6, 2025
1 parent ffb85bb commit 9e69cd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyopenms_viz/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,12 @@ def __init__(
self.data[y] = self.data[y] / self.data[y].max() * 100

self._check_and_aggregate_duplicates()

# sort data by x so in order
self.data.sort_values(by=x, inplace=True)
if self.by is not None:
self.data.sort_values(by=[self.by, x], inplace=True)
else:
self.data.sort_values(by=x, inplace=True)

self.plot(self.data, self.x, self.y, **kwargs)

Expand Down

0 comments on commit 9e69cd3

Please sign in to comment.