0% found this document useful (0 votes)
35 views2 pages

Understanding Matplotlib in Python

Uploaded by

vinodangajala34
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Understanding Matplotlib in Python

Uploaded by

vinodangajala34
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

What is Matplotlib?

Matplotlib is a low level graph plotting library in python that serves as a visualization
utility.

Matplotlib was created by John D. Hunter.

Matplotlib is open source and we can use it freely.

Matplotlib is mostly written in python, a few segments are written in C, Objective-C


and Javascript for Platform compatibility.

Pyplot

Most of the Matplotlib utilities lies under the pyplot submodule, and are usually
imported under the plt alias:

import [Link] as plt

Now the Pyplot package can be referred to as plt.

Example
Draw a line in a diagram from position (0,0) to position (6,250):
#Three lines to make our compiler able to draw:
import sys
import matplotlib
[Link]('Agg')
import [Link] as plt
import numpy as np
xpoints = [Link]([0, 6])
ypoints = [Link]([0, 250])
[Link](xpoints, ypoints)
[Link]()
#Two lines to make our compiler able to draw:
[Link]([Link])
[Link]()
Output:

You might also like