Introducción a la visualización de datos con Seaborn
Erin Case
Data Scientist
Dos tipos de gráficos relacionales: gráficos de dispersión y gráficos de líneas
Gráficos de dispersión
Gráficos de líneas
import matplotlib.pyplot as plt
import seaborn as sns
sns.relplot(x="hour", y="NO_2_mean",
data=air_df_mean,
kind="scatter")
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.relplot(x="hour", y="NO_2_mean",
data=air_df_mean,
kind="line")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.relplot(x="hour", y="NO_2_mean", data=air_df_loc_mean, kind="line", style="location", hue="location")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.relplot(x="hour", y="NO_2_mean", data=air_df_loc_mean, kind="line", style="location", hue="location", markers=True)
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.relplot(x="hour", y="NO_2_mean", data=air_df_loc_mean, kind="line", style="location", hue="location", markers=True, dashes=False)
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.relplot(x="hour", y="NO_2",
data=air_df,
kind="scatter")
plt.show()
import matplotlib.pyplot as plt
import seaborn as sns
sns.relplot(x="hour", y="NO_2",
data=air_df,
kind="line")
plt.show()
La zona sombreada es el intervalo de confianza
import matplotlib.pyplot as plt import seaborn as sns sns.relplot(x="hour", y="NO_2", data=air_df, kind="line", ci="sd")
plt.show()
import matplotlib.pyplot as plt import seaborn as sns sns.relplot(x="hour", y="NO_2", data=air_df, kind="line", ci=None)
plt.show()
Introducción a la visualización de datos con Seaborn