matplotlib python高级绘图库 一周总结
matplotlib python高级绘图库 一周总结
是一个python科学作图库,可以快速的生成很多非常专业的图表。
只要你掌握要领,画图将变得非常方便(不能说非常简单,只能说非常方便,
科学绘图确实很复杂,需要较久时间熟悉)。
后续简称 mpl 库。
既然是作图,那么图里面总有坐标系,绘图画板,坐标轴等概念和操作方式。
mpl都提供了具体的类来对应。
总结一周以来的学习心得(仅生成过2D坐标,就不讨论3D和立体图等)。
http://matplotlib.org/faq/usage_faq.html#general-concepts
提供了基本概念描述:
General Concepts
matplotlib has an extensive codebase that can be daunting to many new users. However, most of matplotlib can be understood with a fairly simple conceptual framework and knowledge of a few important points.
mpl 代码库比较肥,新用户一般都比较困扰(学霸除外)。
但可以从一个一致的逻辑架构和几个关键知识点入手来理清mpl库。
Plotting requires action on a range of levels, from the most general (e.g., ‘contour this 2-D array’) to the most specific (e.g., ‘color this screen pixel red’). The purpose of a plotting package is to assist you in visualizing your data as easily as possible, with all the necessary control – that is, by using relatively high-level commands most of the time, and still have the ability to use the low-level commands when needed.
制图,总共是几种层次的绘图指令(比如,最常见的绘制某2维数组图 或 将此屏幕的像素渲染成红色)。
mpl当然就是在你把数据转换成可视图像中提供尽量多的方便,但又不失掉细节控制力---这些都通过提供
相对高层次的各种命令来完成,但更底层具体的命令也是可用的。
Therefore, everything in matplotlib is organized in a hierarchy. At the top of the hierarchy is the matplotlib “state-machine environment” which is provided by the matplotlib.pyplot module. At this level, simple functions are used to add plot elements (lines, images, text, etc.) to the current axes in the current figure.
因此,所有mpl的内容都是以树形逻辑来组织。最顶层,是mpl的“状态机接口环境”,由mpl.pyplot模块提供。
。。。
mpl提供了两个模块来提供两种开发体验。
- matplotlib.pyplot
- matplotlib.pylab
下面是各种名词概念。
Figure
所有mpl的图都是绘制在Figure上的某处,figure是所有东西的总管。
Axes
坐标系,一个Figure可能会有多个Axes。
Axis
2D坐标系的某坐标轴,上面的Axes是复数性质,即Axes是坐标系,Axis是x或者y坐标。
Artist
mpl各种图像实体的父类。
某实体,包括Axes、Axis,Ticker,Locator等都是Artist的子类。
未完待续。
matplotlib python高级绘图库 一周总结的更多相关文章
- Matplotlib Toolkits:python高级绘图库seaborn
http://blog.csdn.net/pipisorry/article/details/49515745 Seaborn介绍 seaborn (Not distributed with matp ...
- Python第三方库matplotlib(2D绘图库)入门与进阶
Matplotlib 一 简介: 二 相关文档: 三 入门与进阶案例 1- 简单图形绘制 2- figure的简单使用 3- 设置坐标轴 4- 设置legend图例 5- 添加注解和绘制点以及在图形上 ...
- Python中用绘图库绘制一条蟒蛇
一..构思设计蟒蛇的长度颜色等 首先,我们来构思一个简单的蟒蛇.让它的颜色为黄色,形状为一条正在爬行的蟒蛇. 二..准备绘图库 Python中有一个绘图库叫turtle我们先引入它. import t ...
- 23、matplotlib数据可视化、绘图库模块
matplotlib官方文档:https://matplotlib.org/contents.html?v=20190307135750 matplotlib是一个绘图库,它可以创建常用的统计图,包括 ...
- Python图表绘制:matplotlib绘图库入门
matplotlib 是Python最著名的绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地行制图.而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中. 它的文档相当完备,并 ...
- Python图表绘制:matplotlib绘图库入门(转)
matplotlib 是Python最著名的绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地行制图.而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中. 它的文档相当完备,并 ...
- Python Matplotlib绘图库 安装
一般我们在做科学计算的时候,首先会想到的是matlab,但是呢,一想到matlab安装包那么大,我就有点不想说什么了. Matplotlib 是python最著名的绘图库,它提供了一整套和matlab ...
- 使用 Python 的 matplotlib 绘图库进行绘图
matplotlib 是 Python 最著名的绘图库,它提供了一整套和matlab相似的命令API,十分适合交互式地行制图.而且也可以方便地将它作为绘图控件,嵌入GUI应用程序中. 1 使用 Ma ...
- python 绘图库 Matplotlib
matplotlib官方文档 使用Matplotlib,能够轻易生成各种图像,例如:直方图.波谱图.条形图.散点图等. 入门代码实例 import matplotlib.pyplot as plt i ...
随机推荐
- API、ABI区别
http://blog.csdn.net/xinghun_4/article/details/7905298 应用程序二进制接口(ABI-Application Binary Interface)定义 ...
- unity中的欧拉角
unity中欧拉角用的是heading - pitch -bank系统(zxy惯性空间旋转系统):当认为旋转顺序是zxy时,是相对于惯性坐标系旋转.当认为旋转顺序是yxz时,是相对于物体坐标系旋转. ...
- vs2010 clickone 工程安装后的路径 win7
C:\Users\xuan\AppData\Local\Apps\2.0\DX16T5JV.MLO\1H1ZAND1.1ZY\test..tion_f74974f651f2573b_0001.0000 ...
- 读取Config文件工具类 PropertiesConfig.java
package com.util; import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io ...
- String 深浅拷贝的测试---有待继续测试
public class TestString { void test1() { // TODO Auto-generated method stub String str = new String( ...
- .NET去掉HTML标记
using System.Text.RegularExpressions; /// <summary> /// 去除HTML标记 /// </summary> /// < ...
- jQuery图片无缝滚动JS代码ul/li结构
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- LintCode "Longest Increasing Continuous subsequence II" !!
DFS + Memorized Search (DP) class Solution { int dfs(int i, int j, int row, int col, vector<vecto ...
- tespeed-测试网速的Python工具
1.安装(环境CentOS7) #pip install lxml #wget wget http://sourceforge.net/projects/socksipy/files/socksipy ...
- 如何设置DNS的SPF记录
如何设置DNS的SPF记录 Introduction SPF的完整意思为 "Sender Policy Framework".翻译过来就是发送方策略框架,是一项跟 DNS 相关的技 ...