autofig.axes.Axes.append_subplot (method)


def append_subplot(self, fig=None, subplot_grid=None)

Append this autofig.axes.Axes as a subplot to a matplotlib figure.

Arguments

  • fig (matplotlib figure, optional, default=None): the matplotlib figure on which to append the subplot. If not provided or None, will default to plt.gcf().
  • subplot_grid (tuple of length 2 or None, optional, default=None): subplot grid in format (nrows [int], ncols [int]). The appended subplot will then be placed in the location determined by autofig.axes.Axes.axpos or the next open slot.

Returns

Raises

  • TypeError: if subplot_grid is not None or a tuple
  • ValueError: if subplot_grid is a tuple, but not of 2 integers