Contenido del Curso
First Dive into seaborn Visualization
1. Nice to Meet you, seaborn!
First Dive into seaborn Visualization
3-variable Lineplot
With the help of the seaborn
, we can view the dynamics of the population, for example, relative to each season during 10 years by adding the third variable to our lineplot.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/3lineplot.png)
To initialize a lineplot based on the pandas
DataFrame, you need to input at least 4 parameters: x
y
(columns-markers for the plot), hue
(the third variable), and data
(the DataFrame containing the data).
Look at the code below!
Tarea
- Import the
seaborn
withsns
alias. - Import the
matplotlib.pyplot
withplt
alias. - Import the
pandas
withpd
alias. - Read the file using
df
variable. - Create a 3-variable lineplot using
'year'
column for the x-value and'population'
column for the y-value and'season'
for the hue-value. - Show the plot.
¿Todo estuvo claro?
Contenido del Curso
First Dive into seaborn Visualization
1. Nice to Meet you, seaborn!
First Dive into seaborn Visualization
3-variable Lineplot
With the help of the seaborn
, we can view the dynamics of the population, for example, relative to each season during 10 years by adding the third variable to our lineplot.
![](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/3lineplot.png)
To initialize a lineplot based on the pandas
DataFrame, you need to input at least 4 parameters: x
y
(columns-markers for the plot), hue
(the third variable), and data
(the DataFrame containing the data).
Look at the code below!
Tarea
- Import the
seaborn
withsns
alias. - Import the
matplotlib.pyplot
withplt
alias. - Import the
pandas
withpd
alias. - Read the file using
df
variable. - Create a 3-variable lineplot using
'year'
column for the x-value and'population'
column for the y-value and'season'
for the hue-value. - Show the plot.
¿Todo estuvo claro?