@header@
 
 
matplotlib.artist
index
/usr/lib64/python2.4/site-packages/matplotlib/artist.py

 
Modules
       
sys
warnings

 
Classes
       
Artist
ArtistInspector

 
class Artist
    Abstract base class for someone who renders into a FigureCanvas
 
  Methods defined here:
__init__(self)
add_callback(self, func)
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_clip_box(self)
Return artist clipbox
get_clip_on(self)
Return whether artist uses clipping
get_figure(self)
return the figure instance
get_label(self)
get_transform(self)
return the Transformation instance used by this artist
get_visible(self)
return the artist's visiblity
get_zorder(self)
is_figure_set(self)
is_transform_set(self)
Artist has transform explicity let
pchanged(self)
fire event when property changed
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_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_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_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 defined here:
aname = 'Artist'
zorder = 0

 
class ArtistInspector
    A helper class to insect an Artist and return information about
it's settable properties and their current values
 
  Methods defined here:
__init__(self, o)
Initialize the artist inspector with an artist or sequence of
artists.  Id a sequence is used, we assume it is a homogeneous
sequence (all Artists are of the same type) and it is your
responsibility to make sure this is so.
aliased_name(self, s)
return 'PROPNAME or alias' if s has an alias, else return
PROPNAME.
 
Eg for the line markerfacecolor property, which has an alias,
return 'markerfacecolor or mfc' and for the transform
property, which does not, return 'transform'
get_aliases(self)
get a dict mapping fullname -> alias for each alias in o.
Eg for lines: {'markerfacecolor': 'mfc',
               'linewidth'      : 'lw',
               }
get_setters(self)
Get the attribute strings with setters for object h.  Eg, for a line,
return ['markerfacecolor', 'linewidth', ....]
get_valid_values(self, attr)
get the legal arguments for the setter associated with attr
 
This is done by querying the doc string of the function set_attr
for a line that begins with ACCEPTS:
 
Eg, for a line linestyle, return
[ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
is_alias(self, o)
return true if method object o is an alias for another function
pprint_getters(self)
return the getters and actual values as list of strings'
pprint_setters(self, prop=None, leadingspace=2)
if prop is None, return a list of strings of all settable properies
and their valid values
 
if prop is not None, it is a valid property name and that
property will be returned as a string of property : valid
values

 
Functions
       
get(o, *args, **kwargs)
Return the value of handle property s
 
h is an instance of a class, eg a Line2D or an Axes or Text.
if s is 'somename', this function returns
 
  o.get_somename()
 
getp can be used to query all the gettable properties with getp(o)
Many properties have aliases for shorter typing, eg 'lw' is an
alias for 'linewidth'.  In the output, aliases and full property
names will be listed as
 
  property or  alias = value
 
eg
 
  linewidth or lw = 2
getp(o, *args)
Return the value of handle property s
 
h is an instance of a class, eg a Line2D or an Axes or Text.
if s is 'somename', this function returns
 
  o.get_somename()
 
getp can be used to query all the gettable properties with getp(o)
Many properties have aliases for shorter typing, eg 'lw' is an
alias for 'linewidth'.  In the output, aliases and full property
names will be listed as
 
  property or  alias = value
 
eg
 
  linewidth or lw = 2
setp(h, *args, **kwargs)
matplotlib supports the use of setp ("set property") and getp to set
and get object properties, as well as to do introspection on the
object For example, to set the linestyle of a line to be dashed, you
can do
 
  >>> line, = plot([1,2,3])
  >>> setp(line, linestyle='--')
 
If you want to know the valid types of arguments, you can provide the
name of the property you want to set without a value
 
  >>> setp(line, 'linestyle')
      linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
 
If you want to see all the properties that can be set, and their
possible values, you can do
 
 
  >>> setp(line)
      ... long output listing omitted'
 
setp operates on a single instance or a list of instances.  If you
are in query mode introspecting the possible values, only the first
instance in the sequence is used.  When actually setting values,
all the instances will be set.  Eg, suppose you have a list of two
lines, the following will make both lines thicker and red
 
    >>> x = arange(0,1.0,0.01)
    >>> y1 = sin(2*pi*x)
    >>> y2 = sin(4*pi*x)
    >>> lines = plot(x, y1, x, y2)
    >>> setp(lines, linewidth=2, color='r')
 
setp works with the matlab(TM) style string/value pairs or with
python kwargs.  For example, the following are equivalent
 
    >>> setp(lines, 'linewidth', 2, 'color', r')  # matlab style
    >>> setp(lines, linewidth=2, color='r')       # python style

 
Data
        division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
kwdocd = {'Artist': ' alpha: float\n animated: [...le: [True | False]\n zorder: any number'}
@footer@