__init__(self,
parent,
x,
y,
string,
angle=0,
just=0,
fsize=None,
font=None,
color=None,
width=None,
vjust=0.0,
bbox=None,
reference='absolute',
linewidth=None)
(Constructor)
The label initialization routine.
-
- Parameters:
x -
the x world coordinate of the label
(type=float)
y -
the y world coordinate of the label
(type=float)
string -
the string to display
(type=string)
angle -
The angle at which to draw the label (default: 0)
(type=float)
just -
The justification of the label (default: 0)
(type=float)
fsize -
The character size to use (defaults to global size)
(type=float)
font -
The font with which to draw the label (defaults to global
font)
color -
The color with which to draw the label (defaults to
foreground)
width -
The width (in world coordinates) of the label. If the string
is longer than this width, it is split into several lines. Not
available (yet) with nonzero angle (default None).
(type=float)
vjust -
The vertical justification of the label, if it is split over
several lines. If you imagine the bounding box to have sides (dx
and dy), then the anchor of the box is lower left corner plus
(dx*just, dy*vjust). (default 0)
(type=float)
bbox -
Draw a bouding box around the label. If a single color string
or integer, a box is drawn around the label. If a list of 2 color
strings or integers, the first is used to draw the box and the
second is used to fill in the background (making it opaque).
(default None).
(type=color or list of 2 colors)
reference -
Are the coordinates 'absolute' world or 'relative' to the
viewport? Default: 'absolute'
(type=string)
|