How to change the scatter transparency in Seaborn.pairplot?

对着背影说爱祢 提交于 2020-01-24 10:09:31

问题


sns.pairplot(data_new, kind="scatter", hue="location", plot_kws=dict(s=80, edgecolor="white", linewidth=2.5))

Hey folks, can someone tell me how to change the scatter transparency(alpha should be 0.3) following my code above?

Thank you very much!


回答1:


You are already using plot_kws to pass in parameters to the plotting function. Therefore, alpha is simply another parameter you can add to this dictionary:

sns.pairplot(data_new, kind="scatter", hue="location",
              plot_kws=dict(s=80, edgecolor="white", linewidth=2.5, alpha=0.3))


来源:https://stackoverflow.com/questions/49930250/how-to-change-the-scatter-transparency-in-seaborn-pairplot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!