### Navigation

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

# matplotlib.patches.FancyBboxPatch

class `matplotlib.patches.``FancyBboxPatch`(xy, width, height, boxstyle=’round’, bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)

  Draw a fancy box around a rectangle with lower left at xy*=(*x, y) with specified width and height.

  `FancyBboxPatch` class is similar to `Rectangle` class, but it draws a fancy box around the rectangle. The transformation of the rectangle box to the fancy box is delegated to the `BoxTransmuterBase` and its derived classes.

  xy = lower left corner

  width, height

  boxstyle determines what kind of fancy box will be drawn. It can be a string of the style name with a comma separated attribute, or an instance of `BoxStyle`. Following box styles are available.

  > Class | Name | Attrs
  > --- | --- | ---
  > Circle | `circle` | pad=0.3
  > DArrow | `darrow` | pad=0.3
  > LArrow | `larrow` | pad=0.3
  > RArrow | `rarrow` | pad=0.3
  > Round | `round` | pad=0.3,rounding_size=None
  > Round4 | `round4` | pad=0.3,rounding_size=None
  > Roundtooth | `roundtooth` | pad=0.3,tooth_size=None
  > Sawtooth | `sawtooth` | pad=0.3,tooth_size=None
  > Square | `square` | pad=0.3

  mutation_scale : a value with which attributes of boxstyle (e.g., pad) will be scaled. default=1.

  mutation_aspect : The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. default=None.

  Valid kwargs are:

  > Property | Description
  > --- | ---
  > `agg_filter` | unknown
  > `alpha` | float or None
  > `animated` | [True | False]
  > `antialiased` or aa | [True | False] or None for default
  > `axes` | an `Axes` instance
  > `capstyle` | [‘butt’ | ‘round’ | ‘projecting’]
  > `clip_box` | a `matplotlib.transforms.Bbox` instance
  > `clip_on` | [True | False]
  > `clip_path` | [ (`Path`, `Transform`) | `Patch` | None ]
  > `color` | matplotlib color spec
  > `contains` | a callable function
  > `edgecolor` or ec | mpl color spec, None, ‘none’, or ‘auto’
  > `facecolor` or fc | mpl color spec, or None for default, or ‘none’ for no color
  > `figure` | a `matplotlib.figure.Figure` instance
  > `fill` | [True | False]
  > `gid` | an id string
  > `hatch` | [‘/’ | ‘' | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
  > `joinstyle` | [‘miter’ | ‘round’ | ‘bevel’]
  > `label` | string or anything printable with ‘%s’ conversion.
  > `linestyle` or ls | [‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) | `'-'` | `'--'` | `'-.'` | `':'` | `'None'` | `' '` | `''`]
  > `linewidth` or lw | float or None for default
  > `path_effects` | unknown
  > `picker` | [None|float|boolean|callable]
  > `rasterized` | [True | False | None]
  > `sketch_params` | unknown
  > `snap` | unknown
  > `transform` | `Transform` instance
  > `url` | a url string
  > `visible` | [True | False]
  > `zorder` | any number

## Examples using `matplotlib.patches.FancyBboxPatch`

Fancybox Demo

Reference for matplotlib artists