matplotlib.patches.
BoxStyle
[source]¶BoxStyle
is a container class which defines several
boxstyle classes, which are used for FancyBboxPatch
.
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 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
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 Path
instance. 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.
Circle
(pad=0.3)[source]¶A simple circle box.
Parameters: |
|
---|
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
DArrow
(pad=0.3)[source]¶(Double) Arrow Box
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
LArrow
(pad=0.3)[source]¶(left) Arrow Box
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
RArrow
(pad=0.3)[source]¶(right) Arrow Box
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
Round
(pad=0.3, rounding_size=None)[source]¶A box with round corners.
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
Round4
(pad=0.3, rounding_size=None)[source]¶Another box with round edges.
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
Roundtooth
(pad=0.3, tooth_size=None)[source]¶A rounded tooth box.
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
Sawtooth
(pad=0.3, tooth_size=None)[source]¶A sawtooth box.
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.
Square
(pad=0.3)[source]¶A simple square box.
transmute
(x0, y0, width, height, mutation_size)[source]¶The transmute method is a very core of the
BboxTransmuter
class 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 a
Path
instance.