Ipython Chinese notes about%pylab

Source: Internet
Author: User
Format:%pylab [--no-import-all] [GUI]

This command automatically loads the NumPy and matplotlib libraries in a ipython or notebook environment, consistent with the following statement functions

Import NumPy

Import Matplotlib

From matplotlib import Pylab, Mlab, Pyplot

NP = NumPy

PLT = Pyplot


From Ipython.display Import display

From IPython.core.pylabtools import Figsize, Getfigs


From Pylab Import *

From numpy Import *

If the--no-import-all option is passed, the last two statements above will not be executed

Optional GUI parameters

Specify matplotlib available backend, can be set parameters are, ' agg ', ' gtk ', ' gtk3 ', ' inline ', ' ipympl ', ' Nbagg ', ' notebook ', ' osx ', ' qt ', ' qt4 ', ' qt5 ', ' tk ', ' WX ', if this parameter is set, the corresponding backend is used, otherwise the default backend is used, or the default parameters can be modified in the Matplotlib configuration file.


Only the inline parameter in these parameters draws the chart directly on the Qtconsole or notebook, and the others are drawn in the new Popup dialog box.

Related Article

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.