Skip to content

Commit

Permalink
FIX mwaskom#3537 Disabling the legend based on the x-axis and hue values
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulwaheedsoudagar committed Oct 25, 2023
1 parent 367d588 commit 0195ae5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions seaborn/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2763,8 +2763,8 @@ def catplot(
elif x is not None and y is not None:
raise ValueError("Cannot pass values for both `x` and `y`.")

# Check for x and hue values are same
if x == hue:
# Check for x or y and hue values are same
if x == hue or y == hue:
legend = False

p = Plotter(
Expand Down

0 comments on commit 0195ae5

Please sign in to comment.