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

Conteúdo do Curso

Visualization in Python with matplotlib

Visualization in Python with matplotlib

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

Group by Region

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 8
toggle bottom row

Group by Region

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 3. Capítulo 8
toggle bottom row

Group by Region

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 8
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt