### Navigation

- index
- modules |
- next |
- previous |
- home|
- examples|
- tutorials|
- pyplot|
- docs »
- The Matplotlib API »
- figure »

# matplotlib.figure.Figure

class `matplotlib.figure.``Figure`(figsize=None, dpi=None, facecolor=None, edgecolor=None, linewidth=0.0, frameon=None, subplotpars=None, tight_layout=None)

  The Figure instance supports callbacks through a callbacks attribute which is a `matplotlib.cbook.CallbackRegistry` instance. The events you can connect to are ‘dpi_changed’, and the callback will be called with `func(fig)` where fig is the `Figure` instance.

  patch
    The figure patch is drawn by a `matplotlib.patches.Rectangle` instance
  suppressComposite
    For multiple figure images, the figure will make composite images depending on the renderer option_image_nocomposite function. If suppressComposite is True|False, this will override the renderer.
  figsize
    w,h tuple in inches
  dpi
    Dots per inch
  facecolor
    The figure patch facecolor; defaults to rc `figure.facecolor`
  edgecolor
    The figure patch edge color; defaults to rc `figure.edgecolor`
  linewidth
    The figure patch edge linewidth; the default linewidth of the frame
  frameon
    If False, suppress drawing the figure frame
  subplotpars
    A `SubplotParams` instance, defaults to rc
  tight_layout
    If False use subplotpars; if True adjust subplot parameters using `tight_layout()` with default padding. When providing a dict containing the keys `pad`, `w_pad`, `h_pad` and `rect`, the default `tight_layout()` paddings will be overridden. Defaults to rc `figure.autolayout`.

## Examples using `matplotlib.figure.Figure`

The object-oriented interface

Custom Figure Class

Webapp Demo

Embedding In GTK2

Embedding In GTK3 Panzoom

Embedding In GTK3

Embedding In GTK

Embedding In QT4

Embedding In QT4 Wtoolbar

Embedding In QT5

Embedding In Tk2

Embedding in Tk Canvas

Embedding In Tk

Embedding In Wx2

Embedding In Wx3

Embedding In Wx4

Embedding In Wx5

Embedding WebAgg

Fourier Demo WX

GTK Spreadsheet

Histogram Demo CanvasAgg

MathText WX

Matplotlib With Glade 316

Matplotlib With Glade

WXcursor Demo