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

Group by Continuous VariableGroup by Continuous Variable

Task

This time, we are goint to paint the points for the same scatter plot in respect to the 'hdi' column values.

  1. Initialize a scatter plot with the next parameters:
    • Set points color (c) to the 'hdi' column values of the data;
    • Set colormap (cmap) to 'plasma'.

    Save the call of the .scatter() function to the cax variable.

  2. Apply .colorbar() function to Figure object assigning cax as an argument.

Everything was clear?

Section 3. Chapter 10
toggle bottom row
course content

Course Content

Visualization in Python with matplotlib

Group by Continuous VariableGroup by Continuous Variable

Task

This time, we are goint to paint the points for the same scatter plot in respect to the 'hdi' column values.

  1. Initialize a scatter plot with the next parameters:
    • Set points color (c) to the 'hdi' column values of the data;
    • Set colormap (cmap) to 'plasma'.

    Save the call of the .scatter() function to the cax variable.

  2. Apply .colorbar() function to Figure object assigning cax as an argument.

Everything was clear?

Section 3. Chapter 10
toggle bottom row
some-alt