matplotlib.patches.BoxStyle
-
class matplotlib.patches.BoxStyle[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")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, aspect_ratio=1.)
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). mutation_aspect determines the aspect-ratio of the mutation.return the instance of the subclass with the given style name.
-
class Circle(pad=0.3)[source] -
Bases:
matplotlib.patches._BaseA simple circle box.
Parameters: -
pad : float -
The amount of padding around the original box.
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
-
class DArrow(pad=0.3)[source] -
Bases:
matplotlib.patches._Base(Double) Arrow Box
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
-
class LArrow(pad=0.3)[source] -
Bases:
matplotlib.patches._Base(left) Arrow Box
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
-
class RArrow(pad=0.3)[source] -
Bases:
matplotlib.patches.LArrow(right) Arrow Box
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
-
class Round(pad=0.3, rounding_size=None)[source] -
Bases:
matplotlib.patches._BaseA box with round corners.
- pad
- amount of padding
- rounding_size
- rounding radius of corners. pad if None
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
class Round4(pad=0.3, rounding_size=None)[source] -
Bases:
matplotlib.patches._BaseAnother box with round edges.
- pad
- amount of padding
- rounding_size
- rounding size of edges. pad if None
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
class Roundtooth(pad=0.3, tooth_size=None)[source] -
Bases:
matplotlib.patches.SawtoothA rounded tooth box.
- pad
- amount of padding
- tooth_size
- size of the sawtooth. pad* if None
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
class Sawtooth(pad=0.3, tooth_size=None)[source] -
Bases:
matplotlib.patches._BaseA sawtooth box.
- pad
- amount of padding
- tooth_size
- size of the sawtooth. pad* if None
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
class Square(pad=0.3)[source] -
Bases:
matplotlib.patches._BaseA simple square box.
- pad
- amount of padding
-
transmute(x0, y0, width, height, mutation_size)[source] -
The transmute method is a very core of the
BboxTransmuterclass and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation_size, with which the amount of padding and etc. will be scaled. It returns aPathinstance.
-
Examples using matplotlib.patches.BoxStyle
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/matplotlib.patches.BoxStyle.html