1) barplot
- dodge=False : When hue nesting is used, whether elements should be shifted along the categorical axis
tips["weekend"] = tips["day"].isin(["Sat", "Sun"])
ax = sns.barplot(x="day", y="total_bill", hue="weekend",
data=tips, dodge=False)
- saturation=.5 : Proportion of the original saturation to draw colors at
ax = sns.barplot(x="size", y="total_bill", data=tips,
color="salmon", saturation=.5)
2) boxplot
- linewidth
ax = sns.boxplot(x="day", y="total_bill", hue="time",
data=tips, linewidth=2.5)
- orient="h" : Orientation of the plot (vertical or horizontal)
iris = sns.load_dataset("iris")
ax = sns.boxplot(data=iris, orient="h", palette="Set2")
3) pointplot
- dodge=True : Separate the points for different hue levels along the categorical axis
ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
data=tips, dodge=True)
- linestyles=["-", "--"]
- markers=["o", "x"]
ax = sns.pointplot(x="time", y="total_bill", hue="smoker",
data=tips,
markers=["o", "x"],
linestyles=["-", "--"])
- join=False : Don’t draw a line connecting each point
ax = sns.pointplot(x="tip", y="day", data=tips, join=False)
- estimator=median : Use median as the estimate of central tendency
→ Statistical function to estimate within each categorical bin
from numpy import median
ax = sns.pointplot(x="day", y="tip", data=tips, estimator=median)
- ci=68 : Show the standard error of the mean with the error bars
→ Size of confidence intervals to draw around estimated values. If “sd”, skip bootstrapping and draw the standard deviation of the observations. If None, no bootstrapping will be performed, and error bars will not be drawn.
ax = sns.pointplot(x="day", y="tip", data=tips, ci=68)
- ci="sd" : Show standard deviation of observations instead of a confidence interval
ax = sns.pointplot(x="day", y="tip", data=tips, ci="sd")
- capsize=.2 : Add “caps” to the error bars
→ Width of the “caps” on error bars
ax = sns.pointplot(x="day", y="tip", data=tips, capsize=.2)
'DA' 카테고리의 다른 글
#22. beer.csv (0) | 2021.07.28 |
---|---|
#21. dust.csv (0) | 2021.07.28 |
[seaborn을 이용한 데이터 시각화] #02. jointplot, pairplot, heatmap (0) | 2021.07.26 |
[seaborn을 이용한 데이터 시각화] #01. rugplot, kdeplot, distplot, countplot (0) | 2021.07.23 |
#20. young_survey.csv (0) | 2021.07.22 |