1) jointplot
- kind = { “scatter” | “kde” | “hist” | “hex” | “reg” | “resid” }
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", kind="reg")
- additional keyword arguments
sns.jointplot(
data=penguins, x="bill_length_mm", y="bill_depth_mm",
marker="+", s=100, marginal_kws=dict(bins=25, fill=False),
)
- jointgrid parameters
sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", height=5, ratio=2, marginal_ticks=True)
2) pairplot
- hue="species" : adds a semantic mapping and chances the default marginal plot to a layered kernel density estimate
sns.pairplot(penguins, hue="species")
- kind="kde" : determines both the diagonal and off-diagonal plotting style
sns.pairplot(penguins, kind="kde")
- markers=["o", "s", "D"] : applies a style mapping on the off-diagonal axes
sns.pairplot(penguins, hue="species", markers=["o", "s", "D"])
- corner=True : Set corner=True to plot only the lower triangle
더보기
corner : bool
If True, don’t add axes to the upper (off-diagonal) triangle of the grid, making this a “corner” plot.
sns.pairplot(penguins, corner=True)
3) heatmap
- vmin, vmax : Change the limits of the colormap
ax = sns.heatmap(uniform_data, vmin=0, vmax=1)
- center =0 : Plot a heatmap for data centered on 0 with a diverging colormap
normal_data = np.random.randn(10, 12)
ax = sns.heatmap(normal_data, center=0)
- annot=True : Annotate each cell with the numeric value using integer formatting
ax = sns.heatmap(flights, annot=True, fmt="d")
- linewidths=.5 : Add lines between each cell
ax = sns.heatmap(flights, linewidths=.5)
- cmap : matplotlib colormap name or object, or list of colors, optional
ax = sns.heatmap(flights, cmap="YlGnBu")
- center : Center the colormap at a specific value
ax = sns.heatmap(flights, center=flights.loc["Jan", 1955])
- cbar=False : Don’t draw a colorbar
ax = sns.heatmap(flights, cbar=False)
'DA' 카테고리의 다른 글
#21. dust.csv (0) | 2021.07.28 |
---|---|
[seaborn을 이용한 데이터 시각화] #03. barplot, boxplot, pointplot (0) | 2021.07.27 |
[seaborn을 이용한 데이터 시각화] #01. rugplot, kdeplot, distplot, countplot (0) | 2021.07.23 |
#20. young_survey.csv (0) | 2021.07.22 |
#19. survey.csv (0) | 2021.07.22 |