matplotlib.patches.BoxStyle#
- classmatplotlib.patches.BoxStyle(stylename,**kwargs)[source]#
Bases:
_StyleBoxStyleis a container class which defines severalboxstyle 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
Parameters
Square
squarepad=0.3
Circle
circlepad=0.3
Ellipse
ellipsepad=0.3
LArrow
larrowpad=0.3
RArrow
rarrowpad=0.3
DArrow
darrowpad=0.3
Round
roundpad=0.3, rounding_size=None
Round4
round4pad=0.3, rounding_size=None
Sawtooth
sawtoothpad=0.3, tooth_size=None
Roundtooth
roundtoothpad=0.3, tooth_size=None
An instance of a boxstyle class is a callable object, with the signature
__call__(self,x0,y0,width,height,mutation_size)->Path
x0,y0,width andheight specify the location and size of the boxto be drawn;mutation_size scales the outline properties such as padding.
Return the instance of the subclass with the given style name.
- classCircle(pad=0.3)[source]#
Bases:
objectA circular box.
- Parameters:
- padfloat, default: 0.3
The amount of padding around the original box.
- classDArrow(pad=0.3)[source]#
Bases:
objectA box in the shape of a two-way arrow.
- Parameters:
- padfloat, default: 0.3
The amount of padding around the original box.
- classEllipse(pad=0.3)[source]#
Bases:
objectAn elliptical box.
Added in version 3.7.
- Parameters:
- padfloat, default: 0.3
The amount of padding around the original box.
- classLArrow(pad=0.3)[source]#
Bases:
objectA box in the shape of a left-pointing arrow.
- Parameters:
- padfloat, default: 0.3
The amount of padding around the original box.
- classRArrow(pad=0.3)[source]#
Bases:
LArrowA box in the shape of a right-pointing arrow.
- Parameters:
- padfloat, default: 0.3
The amount of padding around the original box.
- classRound(pad=0.3,rounding_size=None)[source]#
Bases:
objectA 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.
- classRound4(pad=0.3,rounding_size=None)[source]#
Bases:
objectA 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.
- classRoundtooth(pad=0.3,tooth_size=None)[source]#
Bases:
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.