Add Information to the Plot
Task
Swipe to start coding
-
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
).
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 3. ChapterΒ 12
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.94
Add Information to the Plot
Swipe to show menu
Task
Swipe to start coding
-
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
).
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 2.94SectionΒ 3. ChapterΒ 12
single