Plotting Charts in Excel using openpyxl module – Set 2:

In the previous section on plotting charts, we have seen some charts being plotted in excel. This article will discuss some of the other charts, which can be plotted in excel using openpyxl.chart in Python for Data Science.

Code 1: Plotting a Bubble Chart

These are similar to Scatter charts, but in bubble chart, we use a third dimension which determines the size of the bubbles. These charts can include multiple series.

In order to plot bubble chart on excel sheet, we use BubbleChart class from the submodule openpyxl.chart.

Plotting Charts in Excel using openpyxl module in Python for Data Science

OUTPUT:

Plotting Charts in Excel using openpyxl module in Python for Data Science

Code 2: Plotting of Scatter Chart

Scatter charts are also called xy charts. These are similar to some line charts. In order to plot Scatter chart on excel sheet, we use ScatterChart class from the submodule openpyxl.chart.

Plotting Charts in Excel using openpyxl module in Python for Data Science Plotting Charts in Excel using openpyxl module in Python for Data Science

OUTPUT:

Code 3: Plotting of Pie Chart

Pie Chart is similar to a Pizza. In this, the data is plotted as slices, and each slice is used to represent the percentage of the whole. We plot the slices in a clockwise direction with 0° at the top of the circular pie. In this chart,single series of data is taken.

In order to plot Pie chart on excel sheet, we use PieChart class from the submodule openpyxl.chart.

OUTPUT:

Code 4: Plotting of Pie Chart 3D

In order to plot Bar chart on excel sheet, we use PieChart3D class from the submodule openpyxl.chart.

OUTPUT:

To learn more about charts in python for data science, you can check this and this as well. Checkout these blogs to understand it better.

Leave a Reply

Your email address will not be published. Required fields are marked *