| |
- matplotlib.artist.Artist
-
- Collection
-
- LineCollection(Collection, matplotlib.cm.ScalarMappable)
- PatchCollection(Collection, matplotlib.cm.ScalarMappable)
-
- PolyCollection
-
- BrokenBarHCollection
- QuadMesh
- RegularPolyCollection
-
- StarPolygonCollection
class BrokenBarHCollection(PolyCollection) |
|
A colleciton of horizontal bars spanning yrange with a sequence of
xranges |
|
- Method resolution order:
- BrokenBarHCollection
- PolyCollection
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, xranges, yrange, **kwargs)
- xranges : sequence of (xmin, xwidth)
yrange : ymin, ywidth
Valid PatchCollection kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
Methods inherited from PolyCollection:
- draw(self, renderer)
- get_verts(self, dataTrans=None)
- Return vertices in data coordinates.
The calculation is incomplete in general; it is based
on the vertices or the offsets, whichever is using
dataTrans as its transformation, so it does not take
into account the combined effect of segments and offsets.
- set_verts(self, verts)
- This allows one to delay initialization of the vertices.
Methods inherited from PatchCollection:
- get_transformed_patches(self)
- get a sequence of the polygons in the collection in display (transformed) space
The ith element in the returned sequence is a list of x,y
vertices defining the ith polygon
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes inherited from PatchCollection:
- zorder = 1
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class Collection(matplotlib.artist.Artist) |
|
All properties in a collection must be sequences. The
property of the ith element of the collection is the
prop[i % len(props)].
This implies that the properties cycle if the len of props is less
than the number of elements of the collection. A length 1
property is shared by all the elements of the collection
All color args to a collection are sequences of rgba tuples |
|
Methods defined here:
- __init__(self)
- get_verts(self)
- return seq of (x,y) in collection
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- draw(self, renderer, *args, **kwargs)
- Derived classes drawing method
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pick(self, mouseevent)
- the user picked location x,y; if this Artist is within picker
"pick epsilon" of x,y fire off a pick event
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_alpha(self, alpha)
- Set the alpha value used for blending - not supported on
all backends
ACCEPTS: float
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
- zorder = 0
|
class LineCollection(Collection, matplotlib.cm.ScalarMappable) |
|
All parameters must be sequences. The property of the ith line
segment is the prop[i % len(props)], ie the properties cycle if
the len of props is less than the number of sements |
|
- Method resolution order:
- LineCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, segments, linewidths=None, colors=None, antialiaseds=None, linestyle='solid', offsets=None, transOffset=None, norm=None, cmap=None, **kwargs)
- segments is a sequence of ( line0, line1, line2), where
linen = (x0, y0), (x1, y1), ... (xm, ym), or the
equivalent numerix array with two columns.
Each line can be a different length.
colors must be a tuple of RGBA tuples (eg arbitrary color
strings, etc, not allowed).
antialiaseds must be a sequence of ones or zeros
linestyles is a string or dash tuple. Legal string values are
solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq)
where onoffseq is an even length tuple of on and off ink in points.
If linewidths, colors, or antialiaseds is None, they default to
their rc params setting, in sequence form.
If offsets and transOffset are not None, then
offsets are transformed by transOffset and applied after
the segments have been transformed to display coordinates.
If offsets is not None but transOffset is None, then the
offsets are added to the segments before any transformation.
In this case, a single offset can be specified as offsets=(xo,yo),
and this value will be
added cumulatively to each successive segment, so as
to produce a set of successively offset curves.
norm = None, # optional for ScalarMappable
cmap = None, # ditto
The use of ScalarMappable is optional. If the ScalarMappable
matrix _A is not None (ie a call to set_array has been made), at
draw time a call to scalar mappable will be made to set the colors.
- color(self, c)
- Set the color(s) of the line collection. c can be a
matplotlib color arg (all patches have same color), or a a
sequence or rgba tuples; if it is a sequence the patches will
cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- draw(self, renderer)
- get_colors(self)
- get_dashes(self)
- get_linestyle(self)
- get_linewidth(self)
- get_transoffset(self)
- get_verts(self, dataTrans=None)
- Return vertices in data coordinates.
The calculation is incomplete in general; it is based
on the segments or the offsets, whichever is using
dataTrans as its transformation, so it does not take
into account the combined effect of segments and offsets.
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha can be a
float, in which case it is applied to the entire collection,
or a sequence of floats
ACCEPTS: float or sequence of floats
- set_color(self, c)
- Set the color(s) of the line collection. c can be a
matplotlib color arg (all patches have same color), or a a
sequence or rgba tuples; if it is a sequence the patches will
cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linestyle(self, ls)
- Set the linestyles(s) for the collection.
ACCEPTS: ['solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ]
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- set_segments(self, segments)
- set_verts = set_segments(self, segments)
- update_scalarmappable(self)
- If the scalar mappable array is not none, update colors
from scalar data
Data and other attributes defined here:
- zorder = 2
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pick(self, mouseevent)
- the user picked location x,y; if this Artist is within picker
"pick epsilon" of x,y fire off a pick event
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class PatchCollection(Collection, matplotlib.cm.ScalarMappable) |
|
Base class for filled regions such as PolyCollection etc.
It must be subclassed to be usable.
kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
The use of ScalarMappable is optional. If the ScalarMappable
matrix _A is not None (ie a call to set_array has been made), at
draw time a call to scalar mappable will be made to set the face
colors. |
|
- Method resolution order:
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, edgecolors=None, facecolors=None, linewidths=None, antialiaseds=None, offsets=None, transOffset=None, norm=None, cmap=None)
- Create a PatchCollection
Valid PatchCollection kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
- get_transformed_patches(self)
- get a sequence of the polygons in the collection in display (transformed) space
The ith element in the returned sequence is a list of x,y
vertices defining the ith polygon
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes defined here:
- zorder = 1
Methods inherited from Collection:
- get_verts(self)
- return seq of (x,y) in collection
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- draw(self, renderer, *args, **kwargs)
- Derived classes drawing method
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class PolyCollection(PatchCollection) |
| |
- Method resolution order:
- PolyCollection
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, verts, **kwargs)
- verts is a sequence of ( verts0, verts1, ...) where verts_i is
a sequence of xy tuples of vertices, or an equivalent
numerix array of shape (nv,2).
Valid PatchCollection kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
- draw(self, renderer)
- get_verts(self, dataTrans=None)
- Return vertices in data coordinates.
The calculation is incomplete in general; it is based
on the vertices or the offsets, whichever is using
dataTrans as its transformation, so it does not take
into account the combined effect of segments and offsets.
- set_verts(self, verts)
- This allows one to delay initialization of the vertices.
Methods inherited from PatchCollection:
- get_transformed_patches(self)
- get a sequence of the polygons in the collection in display (transformed) space
The ith element in the returned sequence is a list of x,y
vertices defining the ith polygon
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes inherited from PatchCollection:
- zorder = 1
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class QuadMesh(PatchCollection) |
|
Class for the efficient drawing of a quadrilateral mesh.
A quadrilateral mesh consists of a grid of vertices. The dimensions
of this array are (meshWidth+1, meshHeight+1). Each vertex in
the mesh has a different set of "mesh coordinates" representing
its position in the topology of the mesh. For any values (m, n)
such that 0 <= m <= meshWidth and 0 <= n <= meshHeight, the
vertices at mesh coordinates (m, n), (m, n+1), (m+1, n+1), and
(m+1, n) form one of the quadrilaterals in the mesh. There are
thus (meshWidth * meshHeight) quadrilaterals in the mesh.
The mesh need not be regular and the polygons need not be convex.
A quadrilateral mesh is represented by a
(2 x ((meshWidth + 1) * (meshHeight + 1))) Numeric array
'coordinates' where each row is the X and Y coordinates of one
of the vertices.
To define the function that maps from a data point to
its corresponding color, use the set_cmap() function.
Each of these arrays is indexed in row-major order by the
mesh coordinates of the vertex (or the mesh coordinates of
the lower left vertex, in the case of the colors). For example,
the first entry in coordinates is the coordinates of the vertex
at mesh coordinates (0, 0), then the one at (0, 1), then at
(0, 2) .. (0, meshWidth), (1, 0), (1, 1), and so on. |
|
- Method resolution order:
- QuadMesh
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, meshWidth, meshHeight, coordinates, showedges)
- draw(self, renderer)
- get_verts(self, dataTrans=None)
Methods inherited from PatchCollection:
- get_transformed_patches(self)
- get a sequence of the polygons in the collection in display (transformed) space
The ith element in the returned sequence is a list of x,y
vertices defining the ith polygon
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes inherited from PatchCollection:
- zorder = 1
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class RegularPolyCollection(PatchCollection) |
| |
- Method resolution order:
- RegularPolyCollection
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, dpi, numsides, rotation=0, sizes=(1,), **kwargs)
- Draw a regular polygon with numsides.
* dpi is the figure dpi instance, and is required to do the
area scaling.
* numsides: the number of sides of the polygon
* sizes gives the area of the circle circumscribing the
regular polygon in points^2
* rotation is the rotation of the polygon in radians
Valid PatchCollection kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
Example: see examples/dynamic_collection.py for complete example
offsets = nx.mlab.rand(20,2)
facecolors = [cm.jet(x) for x in nx.mlab.rand(20)]
black = (0,0,0,1)
collection = RegularPolyCollection(
fig.dpi,
numsides=5, # a pentagon
rotation=0,
sizes=(50,),
facecolors = facecolors,
edgecolors = (black,),
linewidths = (1,),
offsets = offsets,
transOffset = ax.transData,
)
- draw(self, renderer)
- get_transformed_patches(self)
- get_verts(self, dataTrans=None)
- Return vertices in data coordinates.
The calculation is incomplete; it uses only
the offsets, and only if _transOffset is dataTrans.
Methods inherited from PatchCollection:
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes inherited from PatchCollection:
- zorder = 1
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
|
class StarPolygonCollection(RegularPolyCollection) |
| |
- Method resolution order:
- StarPolygonCollection
- RegularPolyCollection
- PatchCollection
- Collection
- matplotlib.artist.Artist
- matplotlib.cm.ScalarMappable
Methods defined here:
- __init__(self, dpi, numsides, rotation=0, sizes=(1,), **kwargs)
- Draw a regular star like Polygone with numsides.
* dpi is the figure dpi instance, and is required to do the
area scaling.
* numsides: the number of sides of the polygon
* sizes gives the area of the circle circumscribing the
regular polygon in points^2
* rotation is the rotation of the polygon in radians
Valid PatchCollection kwargs are:
edgecolors=None,
facecolors=None,
linewidths=None,
antialiaseds = None,
offsets = None,
transOffset = identity_transform(),
norm = None, # optional for ScalarMappable
cmap = None, # ditto
offsets and transOffset are used to translate the patch after
rendering (default no offsets)
If any of edgecolors, facecolors, linewidths, antialiaseds are
None, they default to their patch.* rc params setting, in sequence
form.
Methods inherited from RegularPolyCollection:
- draw(self, renderer)
- get_transformed_patches(self)
- get_verts(self, dataTrans=None)
- Return vertices in data coordinates.
The calculation is incomplete; it uses only
the offsets, and only if _transOffset is dataTrans.
Methods inherited from PatchCollection:
- get_transoffset(self)
- pick(self, mouseevent)
- fire a pick event with the index into the data if the mouse
click is within the patch
- set_alpha(self, alpha)
- Set the alpha tranpancies of the collection. Alpha must be
a float.
ACCEPTS: float
- set_color(self, c)
- Set both the edgecolor and the facecolor.
See set_facecolor and set_edgecolor.
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_edgecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib color
arg (all patches have same color), or a a sequence or rgba tuples; if
it is a sequence the patches will cycle through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_facecolor(self, c)
- Set the facecolor(s) of the collection. c can be a matplotlib
color arg (all patches have same color), or a a sequence or
rgba tuples; if it is a sequence the patches will cycle
through the sequence
ACCEPTS: matplotlib color arg or sequence of rgba tuples
- set_linewidth(self, lw)
- Set the linewidth(s) for the collection. lw can be a scalar or a
sequence; if it is a sequence the patches will cycle through the
sequence
ACCEPTS: float or sequence of floats
- update_scalarmappable(self)
- If the scalar mappable array is not none, update facecolors
from scalar data
Data and other attributes inherited from PatchCollection:
- zorder = 1
Methods inherited from matplotlib.artist.Artist:
- add_callback(self, func)
- convert_xunits(self, x)
- for artists in an axes, if the xaxis as units support,
convert x using xaxis unit type
- convert_yunits(self, y)
- for artists in an axes, if the yaxis as units support,
convert y using yaxis unit type
- get_alpha(self)
- Return the alpha value used for blending - not supported on all
backends
- get_animated(self)
- return the artist's animated state
- get_axes(self)
- return the axes instance the artist resides in, or None
- get_clip_box(self)
- Return artist clipbox
- get_clip_on(self)
- Return whether artist uses clipping
- get_clip_path(self)
- Return artist clip path
- get_figure(self)
- return the figure instance
- get_label(self)
- get_picker(self)
- return the Pickeration instance used by this artist
- get_transform(self)
- return the Transformation instance used by this artist
- get_visible(self)
- return the artist's visiblity
- get_zorder(self)
- have_units(self)
- return True if units are set on the x or y axes
- is_figure_set(self)
- is_transform_set(self)
- Artist has transform explicity let
- pchanged(self)
- fire event when property changed
- pickable(self)
- return True if self is pickable
- remove_callback(self, oid)
- set(self, **kwargs)
- A tkstyle set command, pass kwargs to set properties
- set_animated(self, b)
- set the artist's animation state
ACCEPTS: [True | False]
- set_axes(self, axes)
- set the axes instance the artist resides in, if any
ACCEPTS: an axes instance
- set_clip_box(self, clipbox)
- Set the artist's clip Bbox
ACCEPTS: a matplotlib.transform.Bbox instance
- set_clip_on(self, b)
- Set whether artist uses clipping
ACCEPTS: [True | False]
- set_clip_path(self, path)
- Set the artist's clip path
ACCEPTS: an agg.path_storage instance
- set_figure(self, fig)
- Set the figure instance the artist belong to
ACCEPTS: a matplotlib.figure.Figure instance
- set_label(self, s)
- Set the line label to s for auto legend
ACCEPTS: any string
- 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
ACCEPTS: [True | False]
- set_picker(self, picker)
- set the epsilon for picking used by this artist
picker can be one of the following:
None - picking is disabled for this artist (default)
boolean - if True then picking will be enabled and the
artist will fire a pick event if the mouse event is over
the artist
float - if picker is a number it is interpreted as an
epsilon tolerance in points and the the artist will fire
off an event if it's data is within epsilon of the mouse
event. For some artists like lines and patch collections,
the artist may provide additional data to the pick event
that is generated, eg the indices of the data within
epsilon of the pick event
function - if picker is callable, it is a user supplied
function which determines whether the artist is hit by the
mouse event.
hit, props = picker(artist, mouseevent)
to determine the hit test. if the mouse event is over the
artist, return hit=True and props is a dictionary of
properties you want added to the PickEvent attributes
ACCEPTS: [None|float|boolean|callable]
- set_transform(self, t)
- set the Transformation instance used by this artist
ACCEPTS: a matplotlib.transform transformation instance
- set_visible(self, b)
- set the artist's visiblity
ACCEPTS: [True | False]
- set_zorder(self, level)
- Set the zorder for the artist
ACCEPTS: any number
- update(self, props)
- update_from(self, other)
- copy properties from other to self
Data and other attributes inherited from matplotlib.artist.Artist:
- aname = 'Artist'
Methods inherited from matplotlib.cm.ScalarMappable:
- add_observer(self, mappable)
- whenever the norm, clim or cmap is set, call the notify
instance of the mappable observer with self.
This is designed to allow one image to follow changes in the
cmap of another image
- autoscale(self)
- Autoscale the scalar limits on the norm instance using the
current array
- autoscale_None(self)
- Autoscale the scalar limits on the norm instance using the
current array, changing only limits that are None
- changed(self)
- Call this whenever the mappable is changed so observers can
update state
- get_array(self)
- Return the array
- get_clim(self)
- return the min, max of the color limits for image scaling
- notify(self, mappable)
- If this is called then we are pegged to another mappable.
Update our cmap, norm, alpha from the other mappable.
- set_array(self, A)
- Set the image array from numeric/numarray A
- set_clim(self, vmin=None, vmax=None)
- set the norm limits for image scaling; if vmin is a length2
sequence, interpret it as (vmin, vmax) which is used to
support setp
ACCEPTS: a length 2 sequence of floats
- set_cmap(self, cmap)
- set the colormap for luminance data
ACCEPTS: a colormap
- set_colorbar(self, im, ax)
- set the colorbar image and axes associated with mappable
- set_norm(self, norm)
- set the normalization instance
- to_rgba(self, x, alpha=1.0)
- Return a normalized rgba array corresponding to x.
If x is already an rgb or rgba array, return it unchanged.
| |