"Bill Baxter" <[EMAIL PROTECTED]> writes:

> Documentation issue/question:  I figured there was probably some way
> to set attributes individually using the return value from contour
> since contour's docstring helpfully tells me that countour returns a
> ContourSet object.  However,  'ContourSet?' in ipython gives me
> nothing.  Similarly with plot(), it says it returns a 'list of lines'
> but that is not so useful since I can't look up the docstring for
> 'list of lines'.

Call setp on the returned object:

In [8]:y = plot(sin(arange(10)))

In [9]:setp(y)
  alpha: float
  animated: [True | False]
  antialiased or aa: [True | False]
  axes: unknown
...
  xdata: array
  ydata: array
  zorder: any number

And similarly:

In [11]:z = contour(outerproduct(arange(10), arange(10)))

In [12]:setp(z)
  alpha: unknown
  array: unknown
  clim: a length 2 sequence of floats
  cmap: a colormap
  colorbar: unknown
  label_props: unknown
  norm: unknown

Or, in ipython you can type z.set_<TAB> to see the completions. With
the list returned from plot you cannot simply type y[0].set_<TAB> but
have to assign the value of y[0] to a variable first.

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to