axhline in OO interface?

Hi folks,

Is there an OO way to get pyplot.axhline() ?

I found Axes.hlines, but it's not as convienent for doing a quick horizontal line all the way across the axes: I need to specify the x coords.

thanks,

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Christopher Barker wrote:

Hi folks,

Is there an OO way to get pyplot.axhline() ?

I found Axes.hlines, but it's not as convienent for doing a quick horizontal line all the way across the axes: I need to specify the x coords.

thanks,

-Chris

Chris,

Maybe it is new, but svn trunk shows that pyplot.axhline is just calling the axes method of the same name.

Eric

def axhline(*args, **kwargs):
     # allow callers to override the hold state by passing hold=True|False
     b = ishold()
     h = kwargs.pop('hold', None)
     if h is not None:
         hold(h)
     try:
         ret = gca().axhline(*args, **kwargs)
         draw_if_interactive()
     except:
         hold(b)
         raise

     hold(b)
     return ret
if Axes.axhline.__doc__ is not None:
     axhline.__doc__ = dedent(Axes.axhline.__doc__) + """

Eric Firing wrote:

Maybe it is new, but svn trunk shows that pyplot.axhline is just calling the axes method of the same name.

yes, indeed it is -- arrg! sorry about that -- I really do think I looked for that!

I am finding it harder to navigate the API docs than I'd like -- I
m not sure what could be done, however. One thing that might help would be an index of all methods at the top of the class docs -- there is a lot of good stuff in each of the methods docs, so it gets hard to quickly look for a method.

-Thanks, and sorry for the noise,

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

The search tool on the website is actually pretty decent

http://matplotlib.sourceforge.net/search.html?q=axhline

unlike many search tools at many websites…

JDH

···

On Tue, Mar 24, 2009 at 2:33 PM, Christopher Barker <Chris.Barker@…259…> wrote:

Eric Firing wrote:

Maybe it is new, but svn trunk shows that pyplot.axhline is just calling

the axes method of the same name.

yes, indeed it is – arrg! sorry about that – I really do think I

looked for that!

I am finding it harder to navigate the API docs than I’d like – I

m not sure what could be done, however. One thing that might help would

be an index of all methods at the top of the class docs – there is a

lot of good stuff in each of the methods docs, so it gets hard to

quickly look for a method.

1st:

Sorry about the stupid questions -- I was under a lot of time pressure yesterday.

John Hunter wrote:

The search tool on the website is actually pretty decent

  Search — Matplotlib 3.8.2 documentation

Yes that is very nice -- I'll make sure to try that in the future. However, that only works if you can make a good stab at the name of a method.

    I am finding it harder to navigate the API docs than I'd like -- I
    m not sure what could be done, however. One thing that might help would
    be an index of all methods at the top of the class docs -- there is a
    lot of good stuff in each of the methods docs, so it gets hard to
    quickly look for a method.

So it would still be nice to have a better way to browse the docs.

But the new docs really are looking great!

The truth is, I haven't used MPL for anything of significance for a good while, and I was yesterday able to whip out a bunch of custom plots in short order for an emergency response -- a testament to the wonders of Matplotlib!

by the way, I'm off to PyCon tomorrow -- are you going to be there John? It's in your neighborhood, yes?

-Chris

···

<Chris.Barker@...259... <mailto:Chris.Barker@…259…>> wrote:

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...