|
From: <jk...@ik...> - 2007-04-17 03:47:47
|
"Bill Baxter" <wb...@gm...> 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 |