4주차 iris 시각화
#김준서
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
import seaborn as sns
import matplotlib.pyplot as plt
sns.set(style="white", color_codes=True)
iris = pd.read_csv('./iris.csv')
sns.scatterplot(x="sepal_length", y="sepal_width", data=iris,hue='species')
sns.stripplot(x="species", y="petal_length", data=iris, jitter=True, edgecolor="gray")
sns.pairplot(iris, hue="species", size=3, diag_kind='hist')
#박준영
import numpy as np
import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
from sklearn import datasets
import seaborn as sns
df = pd.read_csv('C:/Users/jamie/Desktop/iris.csv')
sns.pairplot(df,hue = 'species')
plt.figure(figsize = (10,6))
sns.boxplot(x='species', y = 'sepal_length', data=df)
plt.show()
plt.figure(figsize = (10,6))
sns.histplot(data=df, x = 'sepal_width', hue = 'species', kde = True)
# 지예람
import plotly.express as px
df=px.data.iris()
df
fig= px.scatter(df, 'sepal_width', 'sepal_length')
fig.show()
fig=px.parallel_coordinates(df, color='species_id',
labels={'species_id':'Species',
'sepal_width':'Sepal Width',
'sepal_length': 'Sepal length',
'petal_width':'Petal width',
'petal_length':'Petal Length'},
color_continuous_scale=px.colors.diverging.Tealrose,
color_continuous_midpoint=2)
fig.show()