zoukankan      html  css  js  c++  java
  • seaborn类别图---catplot 、分类散点图stripplot/swarmplot、分类分布图boxplot/boxplot/boxenplot、分类估计图pointplot/barplot/countplot

    1. 分类散点图

    (1)散点图striplot(kind='strip')

    方法1:

    seaborn.stripplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, jitter=True, dodge=False, orient=None, color=None, palette=None, size=5, edgecolor='gray', linewidth=0, ax=None, **kwargs)

    方法2:catplot的kind默认=striplot

    sns.catplot(x="sepal_length", y="species", data=iris)

    (2)带分布的散点图swarmplot(kind='swarm'

    方法1:

    seaborn.swarmplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, dodge=False, orient=None, color=None, palette=None, size=5, edgecolor='gray', linewidth=0, ax=None, **kwargs)

    方法2:

     sns.catplot(x="sepal_length", y="species", kind="swarm", data=iris)   

    2. 分类分布图

    (1)箱线图boxplot(kind='box'

    方法1:

    seaborn.boxplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, width=0.8, dodge=True, fliersize=5, linewidth=None, whis=1.5, notch=False, ax=None, **kwargs)

    方法2:

    sns.catplot(x="sepal_length", y="species", data=iris)

    (2)小提琴图violinplot(kind='violin'

    方法1:

    seaborn.violinplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, bw='scott', cut=2, scale='area', scale_hue=True, gridsize=100, width=0.8, inner='box', split=False, dodge=True, orient=None, linewidth=None, color=None, palette=None, saturation=0.75, ax=None, **kwargs)

    方法2:

    sns.catplot(x="sepal_length", y="species", kind="violin", data=iris)

    (3)boxenplot(kind='boxen')

    方法1:

    seaborn.boxenplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, width=0.8, dodge=True, k_depth='proportion', linewidth=None, scale='exponential', outlier_prop=None, ax=None, **kwargs)

    方法2:

    sns.catplot(x="species", y="sepal_length", kind="boxen", data=iris)

    3. 分类估计图

    (1)pointplot(kind='point')

    方法1:

    seaborn.pointplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, estimator=<function mean>, ci=95, n_boot=1000, units=None, markers='o', linestyles='-', dodge=False, join=True, scale=1, orient=None, color=None, palette=None, errwidth=None, capsize=None, ax=None, **kwargs)

    方法2:

    sns.catplot(x="sepal_length", y="species", kind="point", data=iris)

    (2)直方图barplot(kind='bar'

    方法1:

    seaborn.barplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, estimator=<function mean>, ci=95, n_boot=1000, units=None, orient=None, color=None, palette=None, saturation=0.75, errcolor='.26', errwidth=None, capsize=None, dodge=True, ax=None, **kwargs)

    方法2:

    sns.catplot(x="sepal_length", y="species", kind="bar", data=iris)

    (3)计数的直方图countplot(kind='count'

    方法1:

    seaborn.countplot(x=None, y=None, hue=None, data=None, order=None, hue_order=None, orient=None, color=None, palette=None, saturation=0.75, dodge=True, ax=None, **kwargs)

    方法2:

    sns.catplot(x="species", kind="count", data=iris)
    

      

  • 相关阅读:
    .netcore下Dapper helper类
    C#各版本新增加功能(系列文章)
    MySQL 查询连续登陆7天以上的用户
    MySQL 8.0版本 自动排序函数dense_rank() over()、rank() over()、row_num() over()用法和区别
    MYSQL 查看锁的方式
    MYSQL 回表查询原理,利用联合索引实现索引覆盖
    ES查询某个字段分词结果
    maven 安装和配置
    Java 注解
    Java 异常
  • 原文地址:https://www.cnblogs.com/nxf-rabbit75/p/12097756.html
Copyright © 2011-2022 走看看