plotyy equivalent?

Hi all, I have now figured out how to do this. It goes

    > something like...

That's the basic idea -- matplotlib has some helper functions to make
this easier -- see examples/shared_axis_demo.py

What is the signature of plotyy -- I wasn't aware of this function..

JDH

Has anyone tried to put a legend in a polar plot? I get an error whenever I try this. To reproduce the error, run the polar plot demo and then do something like:

legend( ( "test" ) )

   File "/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/pylab.py", line 2173, in legend
     ret = gca().legend(*args, **kwargs)
   File "/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py", line 1881, in legend
     handles = [h for h, label in zip(get_handles(), labels)]
   File "/group/monte/development/rhe3/tools.0504/lib/python2.4/site-packages/matplotlib/axes.py", line 1869, in get_handles
     handles.extend(self.patches)
AttributeError: PolarAxes instance has no attribute 'patches'

Should I file this as a bug?
Thanks,
Ted
Ted Drain Jet Propulsion Laboratory ted.drain@...369...

Hi John,
here is the plotyy help info.
Cory.

>> help plotyy

  PLOTYY Graphs with y tick labels on the left and right.
     PLOTYY(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axis labeling
     on the left and plots Y2 versus X2 with y-axis labeling on
     the right.

     PLOTYY(X1,Y1,X2,Y2,FUN) uses the plotting function FUN
     instead of PLOT to produce each plot. FUN should be a
     function handle to a plotting function, e.g. @plot, @semilogx,
     @semilogy, @loglog ,@stem, etc. that accepts the syntax H = FUN(X,Y).

     PLOTYY(X1,Y1,X2,Y2,FUN1,FUN2) uses FUN1(X1,Y1) to plot the data for
     the left axes and FUN2(X1,Y1) to plot the data for the right axes.

     [AX,H1,H2] = PLOTYY(...) returns the handles of the two axes created in
     AX and the handles of the graphics objects from each plot in H1
     and H2. AX(1) is the left axes and AX(2) is the right axes.

     See also PLOT, @.

>>

John Hunter wrote:

···

"Cory" == Cory Davis <cdavis@...372...> writes:

    > Hi all, I have now figured out how to do this. It goes
    > something like...

That's the basic idea -- matplotlib has some helper functions to make
this easier -- see examples/shared_axis_demo.py

What is the signature of plotyy -- I wasn't aware of this function..

JDH

-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
---------------------------------------------------
Cory Davis
Institute for Atmospheric and Environmental Science
Room 307, Crew Building, Kings Buildings,
University of Edinburgh. Edinburgh EH9 3JN
phone: +44 131 6505092
www: http://www.geos.ed.ac.uk/contacts/homes/cdavis

John Hunter wrote:

What is the signature of plotyy -- I wasn't aware of this function..

PLOTYY(X1,Y1,X2,Y2) plots Y1 versus X1 with y-axis labeling
    on the left and plots Y2 versus X2 with y-axis labeling on
    the right.

PLOTYY(X1,Y1,X2,Y2,FUN) uses the plotting function FUN
    instead of PLOT to produce each graph. FUN can be a
    function handle or a string that is the name of a plotting
    function, e.g. plot, semilogx, semilogy, loglog, stem,
    etc. or any function that accepts the syntax H = FUN(X,Y).
    For example
       PLOTYY(X1,Y1,X2,Y2,@loglog) % Function handle
       PLOTYY(X1,Y1,X2,Y2,'loglog') % String

I just happened to have MATLAB going in anohter window.