码迷,mamicode.com
首页 > 编程语言 > 详细

python matplotlib绘图

时间:2015-07-08 14:12:17      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

 
Matplotlib offers three functions:cla() # Clear axis clf() # Clear figure close() # Close a figure windowThe documentation doesn‘t offer a lot of insight into what the difference between these functions is. When should I use each function and what exactly does it do?
 
They all do different things, since matplotlib uses a hierarchical order in which a figure window contains a figure which may consist of many axes. The three commands you mention therefore do the following:cla() clears an axis, i.e. the currently active axis in the current figure. It leaves the other axes untouched.clf() clears the entire current figure with all its axes, but leaves the window opened, such that it may be reused for other plots.close() closes a window, which will be the current window, if not specified otherwise.Which functions suits you best depends thus on your use-case.The close() function furthermore allows one to specify which window should be closed. The argument can either be a number or name given to a window when it was created using figure(number_or_name) or it can be a figure instance fig obtained, i.e., usingfig = figure(). If no argument is given to close(), the currently active window will be closed. Furthermore, there is the syntax close(‘all‘), which closes all figures.
 
 
http://www.ibm.com/developerworks/cn/linux/l-matplotlib/index.html
这里也有不少可以学习的东西
 
 
http://www.w3school.com.cn/xmldom/dom_element.asp
 
其实无论什么语言,xml的结构和函数就这些,下次就不用绕了。唉,以前用java时,也是老跑这里找,python又到这里,下次就记住点啊,长点记性。

python matplotlib绘图

标签:

原文地址:http://www.cnblogs.com/jianyingzhou/p/4629840.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!