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

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.

主站蜘蛛池模板: 开远市| 木里| 无极县| 宁波市| 西林县| 林周县| 桐乡市| 易门县| 宁陕县| 鄄城县| 龙江县| 洛川县| 翁源县| 运城市| 久治县| 嘉荫县| 旬邑县| 铁岭县| 阿勒泰市| 昌黎县| 嫩江县| 荆州市| 花莲市| 永泰县| 大姚县| 乌兰浩特市| 神木县| 金平| 启东市| 汝城县| 象山县| 垦利县| 蕉岭县| 宜春市| 临沂市| 德格县| 长沙县| 沾化县| 云和县| 高尔夫| 富宁县|