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)
    

      

  • 相关阅读:
    java中的 equals 与 ==
    String类的内存分配
    SVN用命令行更换本地副本IP地址
    npoi 设置单元格格式
    net core 微服务框架 Viper 调用链路追踪
    打不死的小强 .net core 微服务 快速开发框架 Viper 限流
    net core 微服务 快速开发框架 Viper 初体验20201017
    Anno 框架 增加缓存、限流策略、事件总线、支持 thrift grpc 作为底层传输
    net core 微服务 快速开发框架
    Viper 微服务框架 编写一个hello world 插件02
  • 原文地址:https://www.cnblogs.com/nxf-rabbit75/p/12097756.html
Copyright © 2011-2022 走看看