Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Create a Grouped Bar Chart | Bar Charts
course content

Contenido del Curso

Visualization in Python with matplotlib

Create a Grouped Bar ChartCreate 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, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Tarea

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

¿Todo estuvo claro?

Sección 2. Capítulo 6
toggle bottom row
course content

Contenido del Curso

Visualization in Python with matplotlib

Create a Grouped Bar ChartCreate 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, and x + width/2 for the second. If we want to build three columns, we can use the following approach: x - width, x, and x + width.

Tarea

  1. Save data for 'MUMBAI CITY' in the mumbai variable and all unique values from the 'Month' column in the months variable.
  2. Set width variable value to 0.3.
  3. Set proper first arguments according to the approach from the theory (displayed above). With the last .bar() function call display the mumbai data. Set label to 'Mumbai'.
  4. Set months as x ticks labels.

¿Todo estuvo claro?

Sección 2. Capítulo 6
toggle bottom row
some-alt