Matplotlib plotting of Python data analysis

Source: Internet
Author: User

This blog is used to record learning and facilitate review review.

Pyplot

In the Matplotlib object-oriented drawing library, Pyplot is a convenient interface.

Basic drawing functions

Mp.plot (array of horizontal coordinates, array of vertical coordinates)

 1  from  __future__  import   unicode_literals  2  import   NumPy as NP  3  import   Matplotlib.pyplot as MP  4  x = Np.linspace (-np.pi, Np.pi, 1000)  5  cos_y = Np.cos (x)/26  sin_y = Np.sin (x)  7  mp.plot (x, cos_y)  8  mp.plot (x, sin_y)  9  mp.show () 
Simple Chestnuts

np.linspace(...)The mean is to take 1000 points evenly from-π to + π .

  

  

Matplotlib plotting of Python data analysis

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.