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

Зміст курсу

Visualization in Python with matplotlib

Visualization in Python with matplotlib

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

Create a Stacked Bar Chart

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 4
toggle bottom row

Create a Stacked Bar Chart

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 2. Розділ 4
toggle bottom row

Create a Stacked Bar Chart

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Завдання

You are given the same dataframe data. Your tasks are:

  1. Save data for 'MADURAI' in the madurai variable.
  2. Call .bar() function twice:
    • the first time to build bars for the new_delhi data (the 'Month' column on the x-axis and the 'Rainfall' column on the y-axis);
    • the second time to build bars for the madurai data above built ones (the same columns and order as for the new_delhi data).

    Use 'New Delhi' and 'Madurai' as the label parameters.

  3. Display the legend of the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 2. Розділ 4
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt