Line plots are a nice way to express relationship between two variables. For ex. price v/s quality of a product.

Wikipedia says that a line graph is:

A line chart or line plot or line graph or curve chart is a type of chart which displays information as a series of data points called ‘markers’ connected by straight line segments.

These are also used to express trend in data over intervals of time.

plot(x, y)

x and y are arrays.

Importing necessary libraries

import matplotlib.pyplot as plt
from matplotlib import style

Basic plot

x = [1, 2, 3, 4, 5, 6, 7]
y = [8…

Himanshu Bhatt

I love doing programming and data science.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store