Matplotlib is a library in python and it is numerical mathematical extension for numpy library.
Matplotlib pyplot plot points.
There are various plots which can be used in pyplot are line plot contour histogram scatter 3d plot etc.
Plot x y fmt data none kwargs plot x y fmt x2 y2 fmt2 kwargs the coordinates of the points or line nodes are given by x y.
Plot y versus x as lines and or markers.
Plot x y fmt data none kwargs plot x y fmt x2 y2 fmt2 kwargs the coordinates of the points or line nodes are given by x y.
Plot y versus x as lines and or markers.
Matplotlib pyplot scatter is the most straightforward and standard method to plot data as points in matplotlib.
Pyplot is a state based interface to a matplotlib module which provides a matlab like interface.
We pass the data coordinates to be plotted as arguments to the method.
Matplotlib pyplot plot args scalex true scaley true data none kwargs source.
Let s understand this with some example in this example we will plot only one point.
Matplotlib pyplot scatter x y with x as a sequence of x coordinates and y as a sequence of y coordinates creates a scatter plot of points.
Import matplotlib pyplot as plt x 1 2 3 4 5 6 y 2 1 5 6 3 9 plt scatter x y plt xlabel x plt ylabel y plt title scatter plot plt show.