| |
- matplotlib.artist.Artist
-
- Legend
class Legend(matplotlib.artist.Artist) |
|
Place a legend on the axes at location loc. Labels are a
sequence of strings and loc can be a string or an integer
specifying the legend location
The location codes are
'best' : 0, (currently not supported, defaults to upper right)
'upper right' : 1, (default)
'upper left' : 2,
'lower left' : 3,
'lower right' : 4,
'right' : 5,
'center left' : 6,
'center right' : 7,
'lower center' : 8,
'upper center' : 9,
'center' : 10,
Return value is a sequence of text, line instances that make
up the legend |
|
Methods defined here:
- __init__(self, parent, handles, labels, loc)
- draw(self, renderer)
- draw_frame(self, b)
- b is a boolean. Set draw frame to b
- get_frame(self)
- return the Rectangle instance used to frame the legend
- get_lines(self)
- return a list of lines.Line2D instances in the legend
- get_patches(self)
- return a list of patch instances in the legend
- get_texts(self)
- return a list of text.Text instance in the legend
- get_window_extent(self)
Data and other attributes defined here:
- AXESPAD = 0.02
- FONTSIZE = 10
- HANDLELEN = 0.050000000000000003
- HANDLETEXTSEP = 0.02
- LABELSEP = 0.0050000000000000001
- NUMPOINTS = 4
- PAD = 0.20000000000000001
- codes = {'best': 0, 'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, ...}
Methods inherited from matplotlib.artist.Artist:
- get_alpha(self)
- Return the alpha value used for blending - not supported on
all backends
- get_clip_on(self)
- Return whether artist uses clipping
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- set_alpha(self, alpha)
- Set the alpha value used for blending - not supported on
all backends
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
- set_clip_on(self, b)
- Set whether artist uses clipping
- set_figure(self, fig)
- Set the figure instance the artist belong to
- set_lod(self, on)
- Set Level of Detail on or off. If on, the artists may examine
things like the pixel width of the axes and draw a subset of
their contents accordingly
- set_transform(self, t)
- set the Transformation instance used by this artist
- set_visible(self, b)
- set the artist's visiblity
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
| |