Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Group by Region | Scatter Plots
Visualization in Python with matplotlib
course content

Contenido del Curso

Visualization in Python with matplotlib

Visualization in Python with matplotlib

1. Basics: Line Charts
2. Bar Charts
3. Scatter Plots

Group by Region

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 8
toggle bottom row

Group by Region

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 3. Capítulo 8
toggle bottom row

Group by Region

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Tarea

Let's build a new scatter plot with the same data, but this time painting the points with respect to the region (the 'continent' column). Follow the next steps:

  1. Iterate over pair of colors and regions, using color and region as dummy variables.
  2. Within the loop, filter the observations to a particular continent (respective value of region variable).
  3. Then, within the same loop, initialize a scatter plot of 'gdp per capita' vs 'life exp'. Set color of points to color and set the label parameter to region.
  4. Display the legend of the plot.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. Capítulo 8
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt