|
5 | 5 | .. currentmodule:: matplotlib.figure
|
6 | 6 |
|
7 | 7 | .. automodule:: matplotlib.figure
|
8 |
| - :members: |
9 |
| - :inherited-members: |
| 8 | + :no-members: |
| 9 | + :no-undoc-members: |
| 10 | + |
| 11 | +The Figure class |
| 12 | +================ |
| 13 | +.. autosummary:: |
| 14 | + :toctree: _as_gen |
| 15 | + :template: autosummary_class_only.rst |
| 16 | + :nosignatures: |
| 17 | + |
| 18 | + Figure |
| 19 | + |
| 20 | + |
| 21 | +Adding Axes and SubFigures |
| 22 | +========================== |
| 23 | + |
| 24 | +.. autosummary:: |
| 25 | + :toctree: _as_gen |
| 26 | + :template: autosummary.rst |
| 27 | + :nosignatures: |
| 28 | + |
| 29 | + Figure.add_axes |
| 30 | + Figure.add_subplot |
| 31 | + Figure.subplots |
| 32 | + Figure.subplot_mosaic |
| 33 | + Figure.add_gridspec |
| 34 | + Figure.get_axes |
| 35 | + Figure.axes |
| 36 | + Figure.delaxes |
| 37 | + Figure.subfigures |
| 38 | + Figure.add_subfigure |
| 39 | + |
| 40 | +Saving |
| 41 | +====== |
| 42 | + |
| 43 | +.. autosummary:: |
| 44 | + :toctree: _as_gen |
| 45 | + :template: autosummary.rst |
| 46 | + :nosignatures: |
| 47 | + |
| 48 | + Figure.savefig |
| 49 | + |
| 50 | + |
| 51 | +Annotating |
| 52 | +========== |
| 53 | + |
| 54 | +.. autosummary:: |
| 55 | + :toctree: _as_gen |
| 56 | + :template: autosummary.rst |
| 57 | + :nosignatures: |
| 58 | + |
| 59 | + Figure.colorbar |
| 60 | + Figure.legend |
| 61 | + Figure.text |
| 62 | + Figure.suptitle |
| 63 | + Figure.get_suptitle |
| 64 | + Figure.supxlabel |
| 65 | + Figure.get_supxlabel |
| 66 | + Figure.supylabel |
| 67 | + Figure.get_supylabel |
| 68 | + Figure.align_labels |
| 69 | + Figure.align_xlabels |
| 70 | + Figure.align_ylabels |
| 71 | + Figure.autofmt_xdate |
| 72 | + |
| 73 | + |
| 74 | +Figure geometry |
| 75 | +=============== |
| 76 | + |
| 77 | +.. autosummary:: |
| 78 | + :toctree: _as_gen |
| 79 | + :template: autosummary.rst |
| 80 | + :nosignatures: |
| 81 | + |
| 82 | + Figure.set_size_inches |
| 83 | + Figure.get_size_inches |
| 84 | + Figure.set_figheight |
| 85 | + Figure.get_figheight |
| 86 | + Figure.set_figwidth |
| 87 | + Figure.get_figwidth |
| 88 | + Figure.dpi |
| 89 | + Figure.set_dpi |
| 90 | + Figure.set_dpi |
| 91 | + |
| 92 | +Subplot layout |
| 93 | +============== |
| 94 | + |
| 95 | +.. autosummary:: |
| 96 | + :toctree: _as_gen |
| 97 | + :template: autosummary.rst |
| 98 | + :nosignatures: |
| 99 | + |
| 100 | + Figure.subplots_adjust |
| 101 | + Figure.set_layout_engine |
| 102 | + Figure.get_layout_engine |
| 103 | + |
| 104 | +Discouraged or deprecated |
| 105 | +------------------------- |
| 106 | + |
| 107 | +.. autosummary:: |
| 108 | + :toctree: _as_gen |
| 109 | + :template: autosummary.rst |
| 110 | + :nosignatures: |
| 111 | + |
| 112 | + Figure.tight_layout |
| 113 | + Figure.set_tight_layout |
| 114 | + Figure.get_tight_layout |
| 115 | + Figure.set_constrained_layout |
| 116 | + Figure.get_constrained_layout |
| 117 | + Figure.set_constrained_layout_pads |
| 118 | + Figure.get_constrained_layout_pads |
| 119 | + |
| 120 | +Interactive |
| 121 | +=========== |
| 122 | + |
| 123 | +.. seealso:: |
| 124 | + |
| 125 | + - :ref:`event-handling` |
| 126 | + |
| 127 | +.. autosummary:: |
| 128 | + :toctree: _as_gen |
| 129 | + :template: autosummary.rst |
| 130 | + :nosignatures: |
| 131 | + |
| 132 | + Figure.ginput |
| 133 | + Figure.add_axobserver |
| 134 | + Figure.waitforbuttonpress |
| 135 | + Figure.pick |
| 136 | + |
| 137 | +Modifying appearance |
| 138 | +==================== |
| 139 | + |
| 140 | +.. autosummary:: |
| 141 | + :toctree: _as_gen |
| 142 | + :template: autosummary.rst |
| 143 | + :nosignatures: |
| 144 | + |
| 145 | + Figure.set_frameon |
| 146 | + Figure.get_frameon |
| 147 | + Figure.set_linewidth |
| 148 | + Figure.get_linewidth |
| 149 | + Figure.set_facecolor |
| 150 | + Figure.get_facecolor |
| 151 | + Figure.set_edgecolor |
| 152 | + Figure.get_edgecolor |
| 153 | + |
| 154 | +Adding and getting Artists |
| 155 | +========================== |
| 156 | + |
| 157 | +.. autosummary:: |
| 158 | + :toctree: _as_gen |
| 159 | + :template: autosummary.rst |
| 160 | + :nosignatures: |
| 161 | + |
| 162 | + Figure.add_artist |
| 163 | + Figure.get_children |
| 164 | + Figure.figimage |
| 165 | + |
| 166 | +Getting and modifying state |
| 167 | +=========================== |
| 168 | + |
| 169 | +.. seealso:: |
| 170 | + |
| 171 | + - :ref:`interactive_figures` |
| 172 | + |
| 173 | +.. autosummary:: |
| 174 | + :toctree: _as_gen |
| 175 | + :template: autosummary.rst |
| 176 | + :nosignatures: |
| 177 | + |
| 178 | + Figure.clear |
| 179 | + Figure.gca |
| 180 | + Figure.sca |
| 181 | + Figure.get_tightbbox |
| 182 | + Figure.get_window_extent |
| 183 | + Figure.show |
| 184 | + Figure.set_canvas |
| 185 | + Figure.draw |
| 186 | + Figure.draw_without_rendering |
| 187 | + Figure.draw_artist |
| 188 | + |
| 189 | +.. _figure-api-subfigure: |
| 190 | + |
| 191 | +SubFigure |
| 192 | +========= |
| 193 | + |
| 194 | +Matplotlib has the concept of a `~.SubFigure`, which is a logical figure inside |
| 195 | +a parent `~.Figure`. It has many of the same methods as the parent. See |
| 196 | +:ref:`nested_axes_layouts`. |
| 197 | + |
| 198 | +.. plot:: |
| 199 | + |
| 200 | + fig = plt.figure(layout='constrained', figsize=(4, 2.5), facecolor='lightgoldenrodyellow') |
| 201 | + |
| 202 | + # Make two subfigures, left ones more narrow than right ones: |
| 203 | + sfigs = fig.subfigures(1, 2, width_ratios=[0.8, 1]) |
| 204 | + sfigs[0].set_facecolor('khaki') |
| 205 | + sfigs[1].set_facecolor('lightsalmon') |
| 206 | + |
| 207 | + # Add subplots to left subfigure: |
| 208 | + lax = sfigs[0].subplots(2, 1) |
| 209 | + sfigs[0].suptitle('Left subfigure') |
| 210 | + |
| 211 | + # Add subplots to right subfigure: |
| 212 | + rax = sfigs[1].subplots(1, 2) |
| 213 | + sfigs[1].suptitle('Right subfigure') |
| 214 | + |
| 215 | + # suptitle for the main figure: |
| 216 | + fig.suptitle('Figure') |
| 217 | + |
| 218 | +SubFigure class |
| 219 | +--------------- |
| 220 | + |
| 221 | +.. autosummary:: |
| 222 | + :toctree: _as_gen |
| 223 | + :template: autosummary_class_only.rst |
| 224 | + :nosignatures: |
| 225 | + |
| 226 | + SubFigure |
| 227 | + |
| 228 | +Adding Axes and SubFigures |
| 229 | +-------------------------- |
| 230 | +.. autosummary:: |
| 231 | + :toctree: _as_gen |
| 232 | + :template: autosummary.rst |
| 233 | + :nosignatures: |
| 234 | + |
| 235 | + SubFigure.add_axes |
| 236 | + SubFigure.add_subplot |
| 237 | + SubFigure.subplots |
| 238 | + SubFigure.subplot_mosaic |
| 239 | + SubFigure.add_gridspec |
| 240 | + SubFigure.delaxes |
| 241 | + SubFigure.add_subfigure |
| 242 | + SubFigure.subfigures |
| 243 | + |
| 244 | +Annotating |
| 245 | +---------- |
| 246 | + |
| 247 | +.. autosummary:: |
| 248 | + :toctree: _as_gen |
| 249 | + :template: autosummary.rst |
| 250 | + :nosignatures: |
| 251 | + |
| 252 | + SubFigure.colorbar |
| 253 | + SubFigure.legend |
| 254 | + SubFigure.text |
| 255 | + SubFigure.suptitle |
| 256 | + SubFigure.get_suptitle |
| 257 | + SubFigure.supxlabel |
| 258 | + SubFigure.get_supxlabel |
| 259 | + SubFigure.supylabel |
| 260 | + SubFigure.get_supylabel |
| 261 | + SubFigure.align_labels |
| 262 | + SubFigure.align_xlabels |
| 263 | + SubFigure.align_ylabels |
| 264 | + |
| 265 | +Adding and getting Artists |
| 266 | +-------------------------- |
| 267 | + |
| 268 | +.. autosummary:: |
| 269 | + :toctree: _as_gen |
| 270 | + :template: autosummary.rst |
| 271 | + :nosignatures: |
| 272 | + |
| 273 | + SubFigure.add_artist |
| 274 | + SubFigure.get_children |
| 275 | + |
| 276 | +Modifying appearance |
| 277 | +-------------------- |
| 278 | + |
| 279 | +.. autosummary:: |
| 280 | + :toctree: _as_gen |
| 281 | + :template: autosummary.rst |
| 282 | + :nosignatures: |
| 283 | + |
| 284 | + SubFigure.set_frameon |
| 285 | + SubFigure.get_frameon |
| 286 | + SubFigure.set_linewidth |
| 287 | + SubFigure.get_linewidth |
| 288 | + SubFigure.set_facecolor |
| 289 | + SubFigure.get_facecolor |
| 290 | + SubFigure.set_edgecolor |
| 291 | + SubFigure.get_edgecolor |
| 292 | + |
| 293 | +Passthroughs |
| 294 | +------------ |
| 295 | + |
| 296 | +.. autosummary:: |
| 297 | + :toctree: _as_gen |
| 298 | + :template: autosummary.rst |
| 299 | + :nosignatures: |
| 300 | + |
| 301 | + SubFigure.set_dpi |
| 302 | + SubFigure.get_dpi |
| 303 | + |
| 304 | + |
| 305 | +FigureBase parent class |
| 306 | +======================= |
| 307 | + |
| 308 | +.. autoclass:: FigureBase |
0 commit comments