这个链接里有下面这个图(图里还有超链接):https://matplotlib.org/3.1.1/api/artist_api.html#matplotlib.artist.Artist

各种图例:(可以在不知道想要功能的基类时在这里面找):https://matplotlib.org/gallery/index.html

未分类:

get_xticklabels()返回一个text object的list,可以参考text object的属性来设置想要的功能

  text:https://matplotlib.org/3.1.1/api/text_api.html#matplotlib.text.Text

设置label的offset的:class matplotlib.text.Text   的 horizontalalignment 属性:

  参考链接:https://matplotlib.org/3.1.1/api/text_api.html#matplotlib.text.Text

legend:图例

  参考链接:https://matplotlib.org/users/legend_guide.html(未看完)

  基础链接:https://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.figlegend(未看完)

  里面有怎么为plot添加图例的,包括位置、颜色、形状和label说明

知道base class的

figure:

  可以理解为画板(还有一个大写的Figure)

  参考链接:https://matplotlib.org/3.1.1/api/figure_api.html?highlight=figure#module-matplotlib.figure

  是个module,提供了top-level的Artist,The Figure 包括了所有的绘制元素

  还有定义的一些子类

Artist class

  abstract base class for objects that render into a FigureCanvas(渲染为FigureCanvas的对象的抽象基类?#canvas:画布)

  一般情况下,figure中的所有可见元素都是Artist的子类

  参考链接:https://matplotlib.org/3.1.1/api/artist_api.html#matplotlib.artist.Artist

Figure:(也是一个类)

  The top level container for all the plot elements

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.figure.Figure.html#matplotlib.figure.Figure

  有回调函数和事件

  链接里有这个类的属性和参数,还有一些方法,添加Artist到figure,添加axes到figure(这种添加方式,如果如果图中已经有一个带键的轴,那么它只会使轴成为当前轴并返回它)还有别的,太长了,没看下去

plot:画布,

  是画板的一小部分

Axes

  是一个类,包括figure上的大部分figure元素:(Axis、Tick、line2D、Text、polygon...etc,)并且色泽这个坐标系,含有事件和回调函数,会在figure中建立一个axes

  参考链接:https://matplotlib.org/3.1.1/api/axes_api.html?highlight=axes#module-matplotlib.axes

  参考链接中还有subplots、plotting

Axis

  就是坐标轴了:

  参考链接:https://matplotlib.org/3.1.1/api/axis_api.html?highlight=label%20offset#id17(有很多内置类和方法)

  secondary Axis:次要坐标轴,就是上面的和右边的轴

  参考链接:https://matplotlib.org/3.1.1/gallery/subplots_axes_and_figures/secondary_axis.html#sphx-glr-gallery-subplots-axes-and-figures-secondary-axis-py

  介绍了添加次要坐标轴的方法,举了一个例子说明

label

  label是坐标轴上的标签,就是tick的文字内容,一条坐标轴上可以有多个labels

  参考链接:https://matplotlib.org/3.1.1/gallery/lines_bars_and_markers/barchart.html#sphx-glr-gallery-lines-bars-and-markers-barchart-py

  旋转label文字方向的:https://matplotlib.org/3.1.1/gallery/ticks_and_spines/ticklabels_rotation.html#sphx-glr-gallery-ticks-and-spines-ticklabels-rotation-py

Tick

  是坐标轴上的标记  

  参考链接:https://matplotlib.org/3.1.1/api/ticker_api.html#module-matplotlib.ticker

  关于tick的定位和格式,太长了没看完

  matplotlib.pyplot.xticks:获取或者设置当前x轴上的tick的位置和label

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.xticks.html#matplotlib.pyplot.xticks

  返回一个包含label位置的数组,一个文字对象列表

  plyplot调用(.xticks())(有参和无参)等等同与当前axes调用方法(.get_xticks()和get_xticklabels())

  还可以Set text labels and properties:

  参考链接中还包含ticks可以完成的工作,用图直观的罗列了出来

  Custom Ticker1

  参考链接:https://matplotlib.org/3.1.1/gallery/ticks_and_spines/custom_ticker1.html#sphx-glr-gallery-ticks-and-spines-custom-ticker1-py

  The new ticker code was designed to explicitly support user customized ticking.

  举了一个例子,通过一个自定义的函数,来自定义ticking

matplotlib.projections

  The projection type of the subplot (Axes)

  管理一组可供系统调用的projections(projection:投影)base:object

  参考链接:https://translate.google.cn/?hl=zh-CN&tab=TT#view=home&op=translate&sl=en&tl=zh-CN&text=projections

matplotlib.pyplot

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.html?highlight=pyplot#module-matplotlib.pyplot

  为matplotlib提供的基类接口,提供像MATLAB那样的方式来画图。主要用来交互式作图或者程序化作图的简单情况。推荐使用它解决更复杂的plots

matplotlib.pyplot.subplot

  在当前figure中add a subplot,返回一个axes

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.subplot.html

  和Figure.add_subplot()的不同

  前者创建一个subplot会删除 除了交叠边界 以外与其重叠的 任何已经存在的subplot,而Figure.add_subplot()不会

  后面以图片的信息展示了许多使用此种方法可以完成的图像

matplotlib.pyplot.subplots_adjust

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.subplots_adjust.html#matplotlib.pyplot.subplots_adjust

  调整这个subplots的布局

  介绍了默认参数的意思(并且建议使用默认参数)

left = 0.125  #figure 上的subplots的左边宽度
right = 0.9 # the right side of the subplots of the figure
bottom = 0.1 # the bottom of the subplots of the figure
top = 0.9 # the top of the subplots of the figure
wspace = 0.2 # 在subplots中间保留的高度的量,使用一个axis 高度的分数来表示
hspace = 0.2 # the amount of height reserved for space between subplots,
# expressed as a fraction of the average axis height

  实际默认值由rc file 控制

matplotlib.pyplot.matshow

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.matshow.html#matplotlib.pyplot.matshow

  在一个新的figure窗口中通过矩阵显示一个排列(类似像素点的图像,而不是你想的那样,链接中又sample)。原点设置在左上角,并且行(array中的第一个维度)垂直排列。figure窗口的纵横比就是这个array的,除非这样产生过分短或者狭窄的figure。

matplotlib.pyplot.figure

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.figure.html#matplotlib.pyplot.figure

  creat a new figure

  需要注意的是,如果你需要创建多个figures,确保你明确调用了pyplot.close()对你不使用的figure,因为这样能确保pyplot正确的从memory中清理

  rcparm定义默认值,这些值能在 matplotlibrc文件中更改

matplotlib.pyplot.show

  参考链接:https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.show.html#matplotlib.pyplot.show

  提供了一些画图的例子,但是觉得可以直接看gallery中的

  显示figure,需要注意的是在非交互模式中,会显示所有的figure并且block(阻塞?不知道是阻塞或者figure的同位语)直到所有的figure 被关闭。

  而在交互模式中没有影响,除非你在又非交互模式切换到交互模式之前创建,在这种情况下,他会导致所有的figure显示并且不阻塞。

  此外,他还提供了一个实验性的关键字参数:block 来覆盖上面描述的阻塞行为。

maximize a plt.show()

参考链接:https://stackoverflow.com/questions/12439588/how-to-maximize-a-plt-show-window-using-python

mng=plt.get_current_fig_manager()
mng.window.state('zoomed')

  

Matplotlib 绘图与可视化 一些控件的介绍和属性,反正就是乱七八糟的的更多相关文章

  1. Tkinter 控件详细介绍

    Tkinter 控件详细介绍 1.Button 按钮.类似标签,但提供额外的功能,例如鼠标掠过.按下.释放以及键盘操作/事件 2.Canvas 画布.提供绘图功能(直线.椭圆.多边形.矩形) ;可以包 ...

  2. iOS开发UI篇—UITableview控件简单介绍

    iOS开发UI篇—UITableview控件简单介绍 一.基本介绍 在众多移动应⽤用中,能看到各式各样的表格数据 . 在iOS中,要实现表格数据展示,最常用的做法就是使用UITableView,UIT ...

  3. iOS开发UI篇—Date Picker和UITool Bar控件简单介绍

    iOS开发UI篇—Date Picker和UITool Bar控件简单介绍 一.Date Picker控件 1.简单介绍: Date Picker显示时间的控件 有默认宽高,不用设置数据源和代理 如何 ...

  4. 重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件增加了 PlaceholderText 属性

    [源码下载] 重新想象 Windows 8.1 Store Apps (77) - 控件增强: 文本类控件的增强, 部分控件增加了 Header 属性和 HeaderTemplate 属性, 部分控件 ...

  5. 使用shape来定义控件的一些显示属性

    Android中常常使用shape来定义控件的一些显示属性,今天看了一些shape的使用,对shape有了大体的了解,稍作总结 先看下面的代码: <shape> <!-- 实心 -- ...

  6. WPF布局控件与子控件的HorizontalAlignment/VerticalAlignment属性之间的关系

    WPF布局控件与子控件的HorizontalAlignment/VerticalAlignment属性之间的关系: 1.Canvas/WrapPanel控件: 其子控件的HorizontalAlign ...

  7. 设置TextBlock默认样式后,其他控件的Text相关属性设置失效问题

    问题: 定义了默认TextBlock样式后,再次自定义下拉框 or 其他控件 ,当内部含有TextBlock时,设置控件的字体相关样式无效,系统始终使用TextBlock设置默认样式 解决方案: 为相 ...

  8. iOS开发基础-UITableView控件简单介绍

     UITableView 继承自 UIScrollView ,用于实现表格数据展示,支持垂直滚动.  UITableView 需要一个数据源来显示数据,并向数据源查询一共有多少行数据以及每一行显示什么 ...

  9. fastreport好象将想合并哪个单元就将那一列的TEXT控件的Merge的属性设成True就可以了

    好象将想合并哪个单元就将那一列的TEXT控件的Merge的属性设成True就可以了 可以用FASTREPORT中的分组打印,你看一下里面的DEMO,里面都有的, 高版本的有suppressRepeat ...

随机推荐

  1. NCcat学习使用

    一.使用手册 1.简介:nc/NetCat是一款端口监听工具,可以用来建立系统之间的连接.传输文件.TCP代理等. 2.命令参数     nc [-options] hostname port[s] ...

  2. 解决在linux下编译32程序出现“/usr/include/gnu/stubs.h:7:27: 致命错误:gnu/stubs-32.h:没有那个文件或目录问题”

    centos64位编译32位代码,出现/usr/include/gnu/stubs.h:7:27: 致命错误:gnu/stubs-32.h:没有那个文件或目录,需要安装32位的glibc库文件. 安装 ...

  3. python27期day11:f-strings格式化、迭代器、生成器、作业题。

    1.建议小写f: name = "宝元"age = 18sex = "男"msg = F"姓名:{name},性别:{age},年龄:{sex}&qu ...

  4. LeetCode 145. Binary Tree Postorder Traversal二叉树的后序遍历 (C++)

    题目: Given a binary tree, return the postorder traversal of its nodes' values. Example: Input: [1,nul ...

  5. SAP_B1系统对象说明 SBO SAP Business One

  6. nginx日志说明

    一.日志说明 nginx日志主要有两种:访问日志和错误日志.访问日志主要记录客户端访问nginx的每一个请求,格式可以自定义:错误日志主要记录客户端访问nginx出错时的日志,格 式不支持自定义.两种 ...

  7. CF932F Escape Through Leaf(DP,斜率优化)

    SB 题. 写出 DP 方程:\(f_i\) 表示从 \(i\) 跳的最小值. \(i\) 是叶子就是 \(0\),否则就是选个子树中的 \(v\),\(f_i=\min(f_v+a_ib_v)\). ...

  8. [LeetCode] 915. Partition Array into Disjoint Intervals 分割数组为不相交的区间

    Given an array A, partition it into two (contiguous) subarrays left and right so that: Every element ...

  9. [LeetCode] 786. K-th Smallest Prime Fraction 第K小的质分数

    A sorted list A contains 1, plus some number of primes.  Then, for every p < q in the list, we co ...

  10. Circumference of circle

    public class Solution { public static void main(String[] args) { Scanner ip = new Scanner(System.in) ...