In my previous** post**, I introduced some simple visualization tips to quickly build good-looking charts with Seaborn and Matplotlib. Today, I’m gonna show you in detail how to build more complex charts, including combination charts and subplots.
There are some packages that we should import first.
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
My dataset is collected from Kaggle public dataset and you can easily download via the following link:
Let’s take a look at our dataset. I will use data related to Germany as an example.
This type of chart demonstrates multiple variables in different formats on the same chart. Combination chart can be helpful when you want to make comparisons between values in different categories.
As an example, let’s visualize the top 10 product categories in Germany by sales and their corresponding revenues.
In the above chart, the top 10 categories are displayed through bar chart and their revenues are displayed through line chart. By looking at this combination graph, we can observe some interesting insights.
Subplot helps create multiple plots on a single panel. In this section, I will show you a few ways to make a beautiful graph with multiple plots.
Again, we are using the top 10 product categories in Germany by sales.
Let’s try to combine 4 plots into a figure.
I’m gonna plot:
#data-visualization #visualization #data-analysis