1

How to control the creation of legend entries for multiple calls to searborn's plotting functions? My problem can be illustrated with the following sample code:

import seaborn as sns
tips = sns.load_dataset("tips")
sns.boxplot(x="day", y="total_bill", hue="smoker",
            palette=["m", "g"], data=tips)
sns.stripplot(x="day", y="total_bill", hue="smoker",
              color="gray", alpha=0.3, data=tips, dodge=True, label=None)
plt.show()

This results in the below plot. How can I suppress the labels for the stripplot, which contain no additional information? I played with the argument label, without success.

enter image description here

normanius
  • 8,629
  • 7
  • 53
  • 83
  • 1
    @BigBen I was searching the web for a solution, but apparently kept the queries too generic. This is exactly what I need. Thanks! :) – normanius Apr 14 '21 at 18:22

0 Answers0