Skip to content

Commit

Permalink
get rid of inplace call for box plots which was causing problems
Browse files Browse the repository at this point in the history
  • Loading branch information
gidden committed Jan 28, 2024
1 parent 98affc1 commit 10ed090
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pyam/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,7 @@ def box(df, y="value", x=None, by=None, legend=True, title=None, ax=None, **kwar
if "palette" not in kwargs and "color" in rc and by in rc["color"]:
# TODO this only works if all categories are defined in run_control
palette = rc["color"][by]
df[by] = df[by].astype("category")
df[by].cat.set_categories(list(palette), inplace=True)
df[by] = df[by].astype("category").cat.set_categories(list(palette))

Check warning on line 713 in pyam/plotting.py

View check run for this annotation

Codecov / codecov/patch

pyam/plotting.py#L713

Added line #L713 was not covered by tests
kwargs["palette"] = palette
else:
df.sort_values(by, inplace=True)
Expand Down

0 comments on commit 10ed090

Please sign in to comment.