Module pygplot :: Class _Label
[show private | hide private]
[frames | no frames]

Class _Label

_Object --+
          |
         _Label


A class used by the Plot class. It defines a label which will be drawn in the plot.
Method Summary
  __init__(self, parent, x, y, string, angle, just, fsize, font, color, width, vjust, bbox, reference, linewidth)
The label initialization routine.
  _str_bounding_box(self)
Returns the bounding box as two lists x and y coordinates for the single string (not broken up into several lines).
  plot(self)
plots the label (usually called by the plot() fuction of its parent class.
    Inherited from _Object
  __getattr__(self, name)

Method Details

__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)

_str_bounding_box(self)

Returns the bounding box as two lists x and y coordinates for the single string (not broken up into several lines).

plot(self)

plots the label (usually called by the plot() fuction of its parent class.

Generated by Epydoc 2.1 on Tue Sep 25 12:14:22 2007 http://epydoc.sf.net