seaborn模块-图像类型
- 内核密度估计
seaborn.kdeplot(x=None, *, y=None, shade=None, vertical=False, kernel=None, bw=None, gridsize=200, cut=3, clip=None, legend=True, cumulative=False, shade_lowest=None, cbar=False, cbar_ax=None, cbar_kws=None, ax=None, weights=None, hue=None, palette=None, hue_order=None, hue_norm=None, multiple='layer', common_norm=True, common_grid=False, levels=10, thresh=0.05, bw_method='scott', bw_adjust=1, log_scale=None, color=None, fill=None, data=None, data2=None, **kwargs)
数据:
x, y vectors or keys in data
Variables that specify positions on the x and y axes.
阴影:
shade bool
网格大小:
gridsize int
Number of points on each dimension of the evaluation grid
累计密度函数:
cumulative bool, optional
If True, estimate a cumulative distribution function.
颜色:
color matplotlib color
Single color specification for when hue mapping is not used. Otherwise, the plot will try to hook into the matplotlib property cycle.
图例:
legend bool
- 热力图
seaborn.heatmap(data, *, vmin=None, vmax=None, cmap=None, center=None, robust=False, annot=None, fmt='.2g', annot_kws=None, linewidths=0, linecolor='white', cbar=True, cbar_kws=None, cbar_ax=None, square=False, xticklabels='auto', yticklabels='auto', mask=None, ax=None, **kwargs)
数据:
data rectangular dataset
可以传入DataFrame中的行和列可以作为热力图中的行和列
如果想要更换行和列索引,转置即可
vmin, vmax floats, optional
用于确定colormap的值,也就是颜色条的一侧对应着vmin和vmax
cmap matplotlib colormap name or object, or list of colors, optional
matplotlib中使用的颜色图,cmap的名称为字符串,比如“Y1GnBu”
center float, optional
绘制离散数据是,中间值对应的颜色值,也就是颜色条的中心为该数值
annot bool or rectangular dataset, optional
是否在每个画框中添加标签
也可以输入数组,主要其形状要与热力图形状匹配
fmt str, optional
指定添加标签的形式,str为格式代号,例如"d"为整数格式
square bool, optional
设置使每一个方框大小相同
linewidths float, optional
每一个图框边界的宽度
linecolor color, optional
每一个图框边界的颜色
cbar bool, optional
是否绘制颜色条
xticklabels, yticklabels “auto”, bool, list-like, or int, optional
是否绘制行列标签,或者直接传入行列标签
整数代表标签的个数
- 散点热力图
seaborn.relplot(*, x=None, y=None, hue=None, size=None, style=None, data=None, row=None, col=None, col_wrap=None, row_order=None, col_order=None, palette=None, hue_order=None, hue_norm=None, sizes=None, size_order=None, size_norm=None, markers=None, dashes=None, style_order=None, legend='auto', kind='scatter', height=5, aspect=1, facet_kws=None, units=None, **kwargs)

浙公网安备 33010602011771号