On this page
matplotlib.patches.BoxStyle
- class
matplotlib.patches.BoxStyle(stylename, **kw)[source] -
Bases:
matplotlib.patches._StyleBoxStyleis a container class which defines several boxstyle classes, which are used forFancyBboxPatch.A style object can be created as:
BoxStyle.Round(pad=0.2)or:
BoxStyle("Round", pad=0.2)or:
BoxStyle("Round, pad=0.2")The following boxstyle classes are defined.
Class Name Attrs Circle circlepad=0.3 DArrow darrowpad=0.3 LArrow larrowpad=0.3 RArrow rarrowpad=0.3 Round roundpad=0.3, rounding_size=None Round4 round4pad=0.3, rounding_size=None Roundtooth roundtoothpad=0.3, tooth_size=None Sawtooth sawtoothpad=0.3, tooth_size=None Square squarepad=0.3 An instance of any boxstyle class is an callable object, whose call signature is:
__call__(self, x0, y0, width, height, mutation_size)and returns a
Pathinstance. x0, y0, width and height specify the location and size of the box to be drawn. mutation_scale determines the overall size of the mutation (by which I mean the transformation of the rectangle to the fancy box).Return the instance of the subclass with the given style name.
- class
Circle(pad=0.3)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA circular box.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__module__= 'matplotlib.patches'
- class
DArrow(pad=0.3)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA box in the shape of a two-way arrow.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__module__= 'matplotlib.patches'
- class
LArrow(pad=0.3)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA box in the shape of a left-pointing arrow.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__module__= 'matplotlib.patches'
- class
RArrow(pad=0.3)[source] -
Bases:
matplotlib.patches.BoxStyle.LArrowA box in the shape of a right-pointing arrow.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__module__= 'matplotlib.patches'
- class
Round(pad=0.3, rounding_size=None)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA box with round corners.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- rounding_sizefloat, default: pad
-
Radius of the corners.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3, rounding_size=None)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- rounding_sizefloat, default: pad
-
Radius of the corners.
__module__= 'matplotlib.patches'
- class
Round4(pad=0.3, rounding_size=None)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA box with rounded edges.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- rounding_sizefloat, default: pad/2
-
Rounding of edges.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3, rounding_size=None)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- rounding_sizefloat, default: pad/2
-
Rounding of edges.
__module__= 'matplotlib.patches'
- class
Roundtooth(pad=0.3, tooth_size=None)[source] -
Bases:
matplotlib.patches.BoxStyle.SawtoothA box with a rounded sawtooth outline.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- tooth_sizefloat, default: pad/2
-
Size of the sawtooth.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__module__= 'matplotlib.patches'
- class
Sawtooth(pad=0.3, tooth_size=None)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA box with a sawtooth outline.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- tooth_sizefloat, default: pad/2
-
Size of the sawtooth.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3, tooth_size=None)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
- tooth_sizefloat, default: pad/2
-
Size of the sawtooth.
__module__= 'matplotlib.patches'
- class
Square(pad=0.3)[source] -
Bases:
matplotlib.patches.BoxStyle._BaseA square box.
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__call__(x0, y0, width, height, mutation_size, mutation_aspect=<deprecated parameter>)[source]-
Given the location and size of the box, return the path of the box around it.
Parameters: - x0, y0, width, heightfloat
-
Location and size of the box.
- mutation_sizefloat
-
A reference scale for the mutation.
Returns:
__init__(pad=0.3)[source]-
Parameters: - padfloat, default: 0.3
-
The amount of padding around the original box.
__module__= 'matplotlib.patches'
__module__= 'matplotlib.patches'
- class
Examples using matplotlib.patches.BoxStyle
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.3/api/_as_gen/matplotlib.patches.BoxStyle.html