官方文档
https://matplotlib.org/api/_as_gen/matplotlib.figure.Figure.html?highlight=add_subplot#matplotlib.figure.Figure.add_subplot

本地doc:

Signature: figure.add_subplot(*args, **kwargs)
Docstring:
Add an `~.axes.Axes` to the figure as part of a subplot arrangement.
作为子图布置的一部分,在图中添加一个〜.axes.Axes。Call signatures::add_subplot(nrows, ncols, index, **kwargs)add_subplot(pos, **kwargs)add_subplot(ax)add_subplot()Parameters
----------
*argsEither a 3-digit integer or three separate integersdescribing the position of the subplot. If the threeintegers are *nrows*, *ncols*, and *index* in order, thesubplot will take the *index* position on a grid with *nrows*rows and *ncols* columns. *index* starts at 1 in the upper leftcorner and increases to the right.*pos* is a three digit integer, where the first digit is thenumber of rows, the second the number of columns, and the thirdthe index of the subplot. i.e. fig.add_subplot(235) is the same asfig.add_subplot(2, 3, 5). Note that all integers must be less than10 for this form to work.If no positional arguments are passed, defaults to (1, 1, 1).In rare circumstances, `.add_subplot` may be called with a singleargument, a subplot axes instance already created in thepresent figure but not in the figure's list of axes.projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str}, optionalThe projection type of the subplot (`~.axes.Axes`). *str* is thename of a custom projection, see `~matplotlib.projections`. Thedefault None results in a 'rectilinear' projection.polar : boolean, optionalIf True, equivalent to projection='polar'.sharex, sharey : `~.axes.Axes`, optionalShare the x or y `~matplotlib.axis` with sharex and/or sharey.The axis will have the same limits, ticks, and scale as the axisof the shared axes.label : strA label for the returned axes.Other Parameters
----------------
**kwargsThis method also takes the keyword arguments forthe returned axes base class. The keyword arguments for therectilinear base class `~.axes.Axes` can be found inthe following table but there might also be other keywordarguments if another projection is used.adjustable: {'box', 'datalim'}agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) arrayalpha: floatanchor: 2-tuple of floats or {'C', 'SW', 'S', 'SE', ...}animated: boolaspect: {'auto', 'equal'} or numautoscale_on: boolautoscalex_on: boolautoscaley_on: boolaxes_locator: Callable[[Axes, Renderer], Bbox]axisbelow: bool or 'line'clip_box: `.Bbox`clip_on: boolclip_path: [(`~matplotlib.path.Path`, `.Transform`) | `.Patch` | None]contains: callablefacecolor: colorfc: colorfigure: `.Figure`frame_on: boolgid: strin_layout: boollabel: objectnavigate: boolnavigate_mode: unknownpath_effects: `.AbstractPathEffect`picker: None or bool or float or callableposition: [left, bottom, width, height] or `~matplotlib.transforms.Bbox`rasterization_zorder: float or Nonerasterized: bool or Nonesketch_params: (scale: float, length: float, randomness: float)snap: bool or Nonetitle: strtransform: `.Transform`url: strvisible: boolxbound: unknownxlabel: strxlim: (left: float, right: float)xmargin: float greater than -0.5xscale: {"linear", "log", "symlog", "logit", ...}xticklabels: List[str]xticks: listybound: unknownylabel: strylim: (bottom: float, top: float)ymargin: float greater than -0.5yscale: {"linear", "log", "symlog", "logit", ...}yticklabels: List[str]yticks: listzorder: floatReturns
-------
axes : `.axes.SubplotBase`, or another subclass of `~.axes.Axes`The axes of the subplot. The returned axes base class depends onthe projection used. It is `~.axes.Axes` if rectilinear projectionare used and `.projections.polar.PolarAxes` if polar projectionare used. The returned axes is then a subplot subclass of thebase class.Notes
-----
If the figure already has a subplot with key (*args*,
*kwargs*) then it will simply make that subplot current and
return it.  This behavior is deprecated. Meanwhile, if you do
not want this behavior (i.e., you want to force the creation of a
new subplot), you must use a unique set of args and kwargs.  The axes
*label* attribute has been exposed for this purpose: if you want
two subplots that are otherwise identical to be added to the figure,
make sure you give them unique labels.See Also
--------
.Figure.add_axes
.pyplot.subplot
.pyplot.axes
.Figure.subplots
.pyplot.subplotsExamples
--------
::fig = plt.figure()fig.add_subplot(221)# equivalent but more generalax1 = fig.add_subplot(2, 2, 1)# add a subplot with no frameax2 = fig.add_subplot(222, frameon=False)# add a polar subplotfig.add_subplot(223, projection='polar')# add a red subplot that share the x-axis with ax1fig.add_subplot(224, sharex=ax1, facecolor='red')#delete x2 from the figurefig.delaxes(ax2)#add x2 to the figure againfig.add_subplot(ax2)
File:      c:\users\huawei\appdata\local\programs\python\python36\lib\site-packages\matplotlib\figure.py
Type:      method

python matplotlib.figure.Figure.add_subplot()方法的使用相关推荐

  1. python matplotlib坐标轴设置的方法

    python matplotlib坐标轴设置的方法 在使用matplotlib模块时画坐标图时,往往需要对坐标轴设置很多参数,这些参数包括横纵坐标轴范围.坐标轴刻度大小.坐标轴名称等 在matplot ...

  2. matplotlib.pyplot中add_subplot方法参数的含义

    有代码如下: import matplotlib.pyplot as plt from numpy import *x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 20] ...

  3. matplotlib.pyplot中add_subplot方法参数111的含义

    >引自:http://www.codeweblog.com/matplotlib-pyplot中add_subplot方法参数111的含义/

  4. python matplotlib.pyplot中add_subplot subplot函数的用法与区别(其实没什么区别)

    引用文章 https://blog.csdn.net/you_are_my_dream/article/details/53439518

  5. python plot设置坐标轴_python matplotlib坐标轴设置的方法

    在使用matplotlib模块时画坐标图时,往往需要对坐标轴设置很多参数,这些参数包括横纵坐标轴范围.坐标轴刻度大小.坐标轴名称等 在matplotlib中包含了很多函数,用来对这些参数进行设置. 我 ...

  6. Python+Matplotlib制作动画

    转载自:https://www.cnblogs.com/endlesscoding/p/10308111.html 看到一篇觉得非常不错的Python+Matplotlib制作动画的方法

  7. python matplotlib:figure,add_subplot,subplot,subplots讲解实现

    最近又用到了matplotlib 中画图的函数.总结几个常用的函数的作用于区别. from matplotlib import pyplot as plt 1.figure() 函数定义matplot ...

  8. python matplotlib fig = plt.figure() fig.add_subplot()

    一.matplotlib.pyplot.figure() Create a new figure, or activate an existing figure. matplotlib官网 功能: 创 ...

  9. pycharm matplotlib.pyplot.figure().add_subplot()绘制三维图时报错:ValueError: Unknown projection 3d(bug)

    报错描述 出于安全考虑,CSDN不让文章标题使用英文单引号 ValueError: Unknown projection '3d' # -*- coding: utf-8 -*- "&quo ...

最新文章

  1. 第四课.KNN电影推荐
  2. python列表转字节_如何在Python中将十进制数转换为字节列表
  3. linux死锁的例子,操作系统教程—Linux实例分析 孟庆昌 第8章 死锁new.ppt
  4. 大二生活之致给影响我最大的大学老师,我和老师的一些事
  5. 学习c语言的困难,刚刚学习C语言,遇到困难了......
  6. 【毕业答辩】论文答辩过不了?做好这几点,再也不用担心自己被“仍论文”
  7. idea通过svn上传_SVN客户端使用(Windows)图文详解
  8. 无法连接Elasticsearch解决方案
  9. linux uuid挂载磁盘_linux下mount硬盘步骤,含UUID mount办法
  10. Xcode快捷键—图文详解
  11. 魔域手游安卓修改服务器地址,魔域手游服务端商业版
  12. Linux重启tomcat服务
  13. 关于嵌入式的bin、hex、axf、map
  14. 计算机c盘用户里的APPDATA,Windows7系统C盘中的appdata文件夹是否可以删除
  15. 计算机网络(2.11)物理层- 宽带接入技术-光纤同轴混合网 (HFC网)
  16. android qq 退出帐号,大家手机上的QQ平常用完退不退出帐号
  17. 【今日CV 计算机视觉论文速览 第118期】Tue, 21 May 2019
  18. 路遥《人生》中经典语录
  19. 如何才能做到色彩平衡?
  20. 说一下我对并发数、吞吐量的理解

热门文章

  1. 【求推荐】优化SAP使用效率的RPA工具推荐
  2. SAP MM模块相关透明表收集
  3. SAP 将smartforms的报表转成PDF
  4. smartform 与调用程序间内表数据传递方法
  5. 订单BOM与销售BOM的区别
  6. SM12表条目冻结说明
  7. 当阿里不想赚钱了,生意该怎么做?
  8. 红帽子linux6.6内核版本,RedHat/CentOS发行版本号及内核版本号对照表
  9. java队列_RPC远程调用和消息队列MQ的区别
  10. python mysql l链式查询_使用python flask sqlacalchemy orm在PostgreSQL中联接查询