Contenido del Curso
Visualization in Python with matplotlib
Visualization in Python with matplotlib
Add Information to the Plot
Swipe to show code editor
-
Using the
.set()
function, perform the following:- set the x-axis label (
xlabel
) to'GDP per capita'
; - set the y-axis label (
ylabel
) to'Life expectancy'
; - set the plot title (
title
) to'GDP per capita vs life expectancy'
.
- set the x-axis label (
-
Assign
fig.colorbar()
to thecbar
variable. -
Set the colormap legend label to
'HDI'
(by applying the.ax.set_xlabel()
to thecbar
).
¡Gracias por tus comentarios!
Add Information to the Plot
Swipe to show code editor
-
Using the
.set()
function, perform the following:- set the x-axis label (
xlabel
) to'GDP per capita'
; - set the y-axis label (
ylabel
) to'Life expectancy'
; - set the plot title (
title
) to'GDP per capita vs life expectancy'
.
- set the x-axis label (
-
Assign
fig.colorbar()
to thecbar
variable. -
Set the colormap legend label to
'HDI'
(by applying the.ax.set_xlabel()
to thecbar
).
¡Gracias por tus comentarios!
Add Information to the Plot
Swipe to show code editor
-
Using the
.set()
function, perform the following:- set the x-axis label (
xlabel
) to'GDP per capita'
; - set the y-axis label (
ylabel
) to'Life expectancy'
; - set the plot title (
title
) to'GDP per capita vs life expectancy'
.
- set the x-axis label (
-
Assign
fig.colorbar()
to thecbar
variable. -
Set the colormap legend label to
'HDI'
(by applying the.ax.set_xlabel()
to thecbar
).
¡Gracias por tus comentarios!
Swipe to show code editor
-
Using the
.set()
function, perform the following:- set the x-axis label (
xlabel
) to'GDP per capita'
; - set the y-axis label (
ylabel
) to'Life expectancy'
; - set the plot title (
title
) to'GDP per capita vs life expectancy'
.
- set the x-axis label (
-
Assign
fig.colorbar()
to thecbar
variable. -
Set the colormap legend label to
'HDI'
(by applying the.ax.set_xlabel()
to thecbar
).