카테고리 형태의 데이터를 산점도로 표현한다면? swarmplot 과 violinplot 비교하기
게시일 : 2019.09.15 07:15
[Scatterplot with categorical variables — seaborn 0.9.0 documentation](https://seaborn.pydata.org/examples/scatterplot_categorical.html)
-----------------
import pandas as pd
import seaborn as sns
sns.set(style="whitegrid", palette="muted")

# Load the example iris dataset
iris = sns.load_dataset("iris")

# "Melt" the dataset to "long-form" or "tidy" representation
iris = pd.melt(iris, "species", var_name="measurement")

# Draw a categorical scatterplot to show each observation
sns.swarmplot(x="measurement", y="value", hue="species",
palette=["r", "c", "y"], data=iris)
-----------------

인프런 강좌
http://bit.ly/inflearn_todaycode
댓글 0
0/3000

추천영상