matplotlib.pyplot.subplots | 您所在的位置:网站首页 › subplots函数作用 › matplotlib.pyplot.subplots |
nrows, ncolsint, default: 1 Number of rows/columns of the subplot grid. sharex, shareybool or {'none', 'all', 'row', 'col'}, default: FalseControls sharing of properties among x (sharex) or y (sharey) axes: True or 'all': x- or y-axis will be shared among all subplots. False or 'none': each subplot x- or y-axis will be independent. 'row': each subplot row will share an x- or y-axis. 'col': each subplot column will share an x- or y-axis. When subplots have a shared x-axis along a column, only the x tick labels of the bottom subplot are created. Similarly, when subplots have a shared y-axis along a row, only the y tick labels of the first column subplot are created. To later turn other subplots' ticklabels on, use tick_params. When subplots have a shared axis that has units, calling set_units will update each axis with the new units. squeezebool, default: TrueIf True, extra dimensions are squeezed out from the returned array of Axes: if only one subplot is constructed (nrows=ncols=1), the resulting single Axes object is returned as a scalar. for Nx1 or 1xM subplots, the returned object is a 1D numpy object array of Axes objects. for NxM, subplots with N>1 and M>1 are returned as a 2D array. If False, no squeezing at all is done: the returned Axes object is always a 2D array containing Axes instances, even if it ends up being 1x1. width_ratiosarray-like of length ncols, optionalDefines the relative widths of the columns. Each column gets a relative width of width_ratios[i] / sum(width_ratios). If not given, all columns will have the same width. Equivalent to gridspec_kw={'width_ratios': [...]}. height_ratiosarray-like of length nrows, optionalDefines the relative heights of the rows. Each row gets a relative height of height_ratios[i] / sum(height_ratios). If not given, all rows will have the same height. Convenience for gridspec_kw={'height_ratios': [...]}. subplot_kwdict, optionalDict with keywords passed to the add_subplot call used to create each subplot. gridspec_kwdict, optionalDict with keywords passed to the GridSpec constructor used to create the grid the subplots are placed on. **fig_kwAll additional keyword arguments are passed to the pyplot.figure call. |
CopyRight 2018-2019 实验室设备网 版权所有 |