- Matplotlib 2.x By Example
- Allen Yu Claire Chung Aldrin Yim
- 133字
- 2021-07-02 19:34:33
Importing the Matplotlib pyplot module
The Matplotlib package includes many modules, including artist that controls the aesthetics, and rcParams for setting default values. The Pyplot module is the plotting interface we will mostly deal with, which creates plots of data in an object-oriented manner.
By convention, we use the plt abbreviation when importing:
import matplotlib.pylot as plt
Don't forget to run the Jupyter Notebook cell magic %matplotlib inline to embed your figure in the output.
Don't use the pylab module!
The use of the pylab module is now discouraged, and generally replaced by the object-oriented (OO) interface. While pylab provides some convenience by importing matplotlib.pyplot and numpy under a single namespace. Many pylab examples are still found online today, but it is much better to call the Matplotlib.pyplot and numpy modules separately.
- JavaScript 網頁編程從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Mastering Concurrency in Go
- Django:Web Development with Python
- GitLab Repository Management
- Blender 3D Incredible Machines
- Java持續交付
- Learning ELK Stack
- The HTML and CSS Workshop
- Java項目實戰精編
- Hands-On Natural Language Processing with Python
- Natural Language Processing with Java and LingPipe Cookbook
- Nagios Core Administration Cookbook(Second Edition)
- ASP.NET求職寶典
- C Primer Plus(第6版)中文版【最新修訂版】
- PhoneGap 3.x Mobile Application Development Hotshot