Add Information to the Plot
Oppgave
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 thecbarvariable. -
Set the colormap legend label to
'HDI'(by applying the.ax.set_xlabel()to thecbar).
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 12
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Suggested prompts:
Oppsummer dette kapittelet
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.94
Add Information to the Plot
Sveip for å vise menyen
Oppgave
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 thecbarvariable. -
Set the colormap legend label to
'HDI'(by applying the.ax.set_xlabel()to thecbar).
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 3. Kapittel 12
single