Search⌘ K

Plotting Data 2: Bivariate Plots

Explore how to plot bivariate data using Python's Pandas and Matplotlib libraries. This lesson teaches you to visualize relationships between two variables with scatter plots, bar plots, and grouped data to uncover patterns and insights in your datasets.

Bivariate plots

Bivariate plots are plots that aim to graph the relationship between two variables. These plots can help us establish relationships and patterns in the data. Some common bivariate plots are:

  • scatter plots
  • bar plots
  • histograms

Let’s look at some of these plots and how we can plot them using Pandas and matplotlib. We will be using Sample Sales Data. The data is in sales_data_sample.csv file. Have a look at the data.

sales_data.csv

Bivariate plots with dataframe.plot

In Pandas, we only need to use the plot function with the dataframe to plot bivariate plots. The function expects the following arguments: ...