标签: jointgrid

如何获取没有填充的联合图标记

matplotlib.pyplot.scatter()有一个facecolors=None参数将使数据点看起来内部是空心的。如何获得相同的外观seaborn.jointplot()

在早期版本的seaborn中也发现了相同的论点,但由于某种原因在最新版本(0.11)中被删除。

python scatter-plot seaborn jointplot jointgrid

5
推荐指数
1
解决办法
3183
查看次数

如何从seaborn JointGrid或jointplot中移动或删除图例

如何去掉剧情中的图例seaborn.JoingGrid

参考代码如下:

import matplotlib.pyplot as plt
import seaborn as sns

penguins = sns.load_dataset("penguins")

g = sns.JointGrid(data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="species")
g.plot_joint(sns.scatterplot)
sns.boxplot(data=penguins, x=g.hue, y=g.y, ax=g.ax_marg_y)
sns.boxplot(data=penguins, y=g.hue, x=g.x, ax=g.ax_marg_x)

plt.show()
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我尝试使用以下已知适用于其他seaborn地块的方法,但在jointplot上失败了:

plt.legend([],[], frameon=False)
g._legend.remove()
Run Code Online (Sandbox Code Playgroud)

python legend seaborn jointplot jointgrid

5
推荐指数
1
解决办法
2000
查看次数

标签 统计

jointgrid ×2

jointplot ×2

python ×2

seaborn ×2

legend ×1

scatter-plot ×1