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
Visualization in Python with matplotlib
course content

Course Content

Visualization in Python with matplotlib

Visualization in Python with matplotlib

1. Basics: Line Charts
2. Bar Charts
3. Scatter Plots

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, 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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 2. Chapter 6
toggle bottom row

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, 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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 2. Chapter 6
toggle bottom row

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, 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.

Task

  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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

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.

Task

  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.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 2. Chapter 6
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt