Conteúdo do Curso
Visualization in Python with matplotlib
Visualization in Python with matplotlib
Create a Grouped Bar Chart
Note
To build 2 columns, we need to set
x - width/2
as the first parameter with the first.bar()
call, andx + width/2
for the second. If we want to build three columns, we can use the following approach:x - width
,x
, andx + width
.
Swipe to show code editor
- Save data for
'MUMBAI CITY'
in themumbai
variable and all unique values from the'Month'
column in themonths
variable. - Set
width
variable value to0.3
. - Set proper first arguments according to the approach from the theory (displayed above). With the last
.bar()
function call display themumbai
data. Setlabel
to'Mumbai'
. - Set
months
as x ticks labels.
Obrigado pelo seu feedback!
Create a Grouped Bar Chart
Note
To build 2 columns, we need to set
x - width/2
as the first parameter with the first.bar()
call, andx + width/2
for the second. If we want to build three columns, we can use the following approach:x - width
,x
, andx + width
.
Swipe to show code editor
- Save data for
'MUMBAI CITY'
in themumbai
variable and all unique values from the'Month'
column in themonths
variable. - Set
width
variable value to0.3
. - Set proper first arguments according to the approach from the theory (displayed above). With the last
.bar()
function call display themumbai
data. Setlabel
to'Mumbai'
. - Set
months
as x ticks labels.
Obrigado pelo seu feedback!
Create a Grouped Bar Chart
Note
To build 2 columns, we need to set
x - width/2
as the first parameter with the first.bar()
call, andx + width/2
for the second. If we want to build three columns, we can use the following approach:x - width
,x
, andx + width
.
Swipe to show code editor
- Save data for
'MUMBAI CITY'
in themumbai
variable and all unique values from the'Month'
column in themonths
variable. - Set
width
variable value to0.3
. - Set proper first arguments according to the approach from the theory (displayed above). With the last
.bar()
function call display themumbai
data. Setlabel
to'Mumbai'
. - Set
months
as x ticks labels.
Obrigado pelo seu feedback!
Note
To build 2 columns, we need to set
x - width/2
as the first parameter with the first.bar()
call, andx + width/2
for the second. If we want to build three columns, we can use the following approach:x - width
,x
, andx + width
.
Swipe to show code editor
- Save data for
'MUMBAI CITY'
in themumbai
variable and all unique values from the'Month'
column in themonths
variable. - Set
width
variable value to0.3
. - Set proper first arguments according to the approach from the theory (displayed above). With the last
.bar()
function call display themumbai
data. Setlabel
to'Mumbai'
. - Set
months
as x ticks labels.