官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 长岭县| 沭阳县| 潮州市| 新绛县| 宜丰县| 鄂伦春自治旗| 泰宁县| 庆阳市| 和静县| 江山市| 万山特区| 高要市| 朔州市| 高安市| 辉县市| 肇庆市| 武威市| 永年县| 德惠市| 万载县| 永安市| 漳平市| 景德镇市| 将乐县| 太康县| 北流市| 梁平县| 石渠县| 中江县| 英德市| 黄石市| 盖州市| 星座| 鄂托克旗| 鄂托克前旗| 财经| 安新县| 苏尼特右旗| 东平县| 潮州市| 绥中县|