Python AttributeError:seaborn中的未知属性图例

Python AttributeError:seaborn中的未知属性图例,python,pandas,matplotlib,legend,seaborn,Python,Pandas,Matplotlib,Legend,Seaborn,seaborn条纹图具有允许色调的功能 使用来自的示例 在这种情况下,图例非常小,每天显示不同的色调。但是,我想删除该图例 通常,其中包括一个参数legend=False。但是,对于stripplot,这似乎输出了一个属性错误: AttributeError: Unknown property legend 可以删除条纹图的图例吗?如果是这样的话,如何做到这一点 使用ax.legend\uux.remove,如下所示: import seaborn as sns import matplotl

seaborn条纹图具有允许色调的功能

使用来自的示例

在这种情况下,图例非常小,每天显示不同的色调。但是,我想删除该图例

通常,其中包括一个参数legend=False。但是,对于stripplot,这似乎输出了一个属性错误:

AttributeError: Unknown property legend
可以删除条纹图的图例吗?如果是这样的话,如何做到这一点

使用ax.legend\uux.remove,如下所示:

import seaborn as sns
import matplotlib.pylab as plt
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.stripplot(x="sex", y="total_bill", hue="day", data=tips, jitter=True)

# remove legend from axis 'ax'
ax.legend_.remove()

plt.show()

@EliSadoff我有点慢:你是如何完全删除这个传说的?@EliSadoff即使有答案,对删除主题的合理搜索也不会让你找到那个问题
import seaborn as sns
import matplotlib.pylab as plt
sns.set_style("whitegrid")
tips = sns.load_dataset("tips")
ax = sns.stripplot(x="sex", y="total_bill", hue="day", data=tips, jitter=True)

# remove legend from axis 'ax'
ax.legend_.remove()

plt.show()