![]() ( see below for more on the format command). Returned by subplots to format different subgroups of subplots In the below example, we use on the grid The 2D indexing is powered by the underlying SubplotGrid permits array-like 2D indexing, e.g.Īxs to return the subplot in the second row, first column, orĪxs to return a SubplotGrid of every subplot SubplotGrid permits list-like 1D indexing, e.g. Then axs.method(.) is equivalent to axs.method(.). In other words, if you make a single subplot with fig, axs = pplt.subplots(), SubplotGrid behaves like a scalar when it is singleton. This list-like,Īrray-like object provides some useful features and unifies the behavior of the Proplot returns a SubplotGrid of subplots. If you create subplots all-at-once with e.g. With a variety of methods and then save the results to the home directory. In the following examples, we add subplots to figures One gridspec can be used with each figure.Īs in matplotlib, to save figures, use savefig (or its With a SubplotSpec generated by indexing a With the geometry implied by previous add_subplot calls. Note that unlike matplotlib, the geometry must be compatible With integer arguments, add_subplot returnsĪ subplot matching the corresponding GridSpec geometry,Īs in matplotlib. With no arguments, add_subplot returns a subplot To add subplots one-by-one, use the _subplotĬommand (or its shorthand ). The returned subplots are contained in a SubplotGrid Slot occupied by the corresponding subplot and 0 indicates an empty space. Layout, where each unique integer indicates a GridSpec Here array is a 2D array representing a “picture” of the subplot With array, add_subplots returns an arbitrarilyĬomplex grid of subplots from a GridSpec with matching Matching geometry in either row-major or column-major order. ![]() Simple grid of subplots from a GridSpec with With ncols or nrows, add_subplots returns a Generated from a 1-row, 1-column GridSpec. With no arguments, add_subplots returns a subplot Proplot command subplots simply calls figureįollowed by _subplots. Similar to matplotlib, subplots can be added to figures one-by-one
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |