A Beginner’s Walkthrough Matplotlib Python

0

 We know how to analyze data by analyzing the statistics of the data and we’ve learned how to manipulate the data. But is statistics enough to analyze the data? Short answer, Visualization of data is necessary in order to find details that we missed that’s why Matplotlib Python is the best library to visualize data using Python. All that can be done using a python library called Matplotlib.

Why Visualize the Data?

Plots in Matplotlib Python

df = pd.read_csv('data.csv')
df.dropna(axis = 1,inplace = True)
df.head()

Importing Matplotlib

import matplotlib.pyplot as plt
%matplotlib inline

Plotting Data using Matplotlib

Line Plot

Scatter Plot

Histogram

Bar Plot

Box Plot

Pie chart

Customize the Plot

Adding Label Axis

Adding Title of the Plot

Adjusting Plot Size

Plotting 2 Plots in One

Adjusting Opacity of the Dots

Adding Legend

Making Subplots

Post a Comment

0Comments
Post a Comment (0)