如何从海运0.11+获得无填充的标记 [英] How to get markers with no fill, from seaborn 0.11+

查看:39
本文介绍了如何从海运0.11+获得无填充的标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

在以前版本的Seborn中找到了相同的参数,但由于某种原因在最新版本(0.11)中被删除。

推荐答案

  • 由于seabornmatplotlib的高级API,这似乎反映了matplotlib
  • 中的功能
  • 根据JointGrid documentation中的示例,参数为fc。要使用fc,还应使用ec
    • 指定fc='none'而不指定ec将导致空白标记。
  • 'None''none'都可以,但None不行。
import seaborn as sns

# load data
penguins = sns.load_dataset("penguins", cache=False)

# set x and y
x, y = penguins["bill_length_mm"], penguins["bill_depth_mm"]

# plot
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", ec="g", fc="none")

这篇关于如何从海运0.11+获得无填充的标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆