New patch

Thanks for the reply. Surprises me that people would

    > really argue about this issue, but well. :slight_smile:

There's just no accounting for the taste of some people... Here are
some links to the original discussion

  http://sourceforge.net/mailarchive/forum.php?thread_id=5434727&forum_id=33405
  http://sourceforge.net/mailarchive/forum.php?thread_id=5440722&forum_id=33405

    > Attached is a slighly changed patch: effectively, it does
    > not change the layering any more, but it changes the
    > internals of errorbar() in a way, that allows to swap the
    > layering by simply swapping two blocks of code. (Which
    > was nontrivial before, since the color from the plot line
    > can only be read after it has been drawn.)

    > Whether this swapping is then done by hand, by an option
    > or an entry in the rc file can be left to the future.

    > Maybe, submitting this patch will save someone else the
    > time to figure it out himself.

How about adding a kwarg to the signature of the errorbar function,
which defaults to below=True (this would have the default behavior you
want, errorbars below markers, but could be customized).

Then you could add an if clause in the errorbar code which reverses
the order of the calls.

Since noone has done the zordering yet, and this issue has come up
twice in the context of errorbars, it is probably worthwhile to add it
now to the errorbar code.

If I could impose in you one more time Norbert to submit a patch that
allows the user to configure the order using a kwarg, I'll be happy to
check it in.

BTW, Gary, any chance I could persuade you to write a tutorial/guide
to using errorbar / bar / barh for the users guide? barh is in CVS.
If you are averse to latex, you could submit in plain text and I can
convert it. I'm mostly done with the matlab interface section and
have been working on other sections (API) and I am having trouble
motivating myself to finish some of these matlab interface sections.
Since you are the world's expert on matplotlib bar charts, I thought
you would be a good victim, er candidate, to write that section. FYI,
I looked into changing the default meaning of x in the errorbar code
to have it refer to the center, rather than the left, as we discussed.
The problem is, this broke some of the table examples, which are a bit
hairy and written by John Gill, so I put it on the back burner. For
barh, however, I did make the y axis mean the center, since we are all
in agreement that this is the more intuitive behavior.

JDH

Here it is.

Did it slightly different by calling the option "bars_on_top=False", which is
more descriptive.

Be aware, that this changes the default behaviour, but the difference is so
subtle that only few people should notice at all. Still, I think this is the
more reasonable default behaviour, since - usually - the plot line is more
important than the errorbars and should be clearly visible.

matplotlib-layering-opt.diff (2.9 KB)

···

On Friday 22 October 2004 15:24, John Hunter wrote:

How about adding a kwarg to the signature of the errorbar function,
which defaults to below=True (this would have the default behavior you
want, errorbars below markers, but could be customized).

Then you could add an if clause in the errorbar code which reverses
the order of the calls.

Since noone has done the zordering yet, and this issue has come up
twice in the context of errorbars, it is probably worthwhile to add it
now to the errorbar code.

If I could impose in you one more time Norbert to submit a patch that
allows the user to configure the order using a kwarg, I'll be happy to
check it in.

--
_________________________________________Norbert Nemec
         Bernhardstr. 2 ... D-93053 Regensburg
     Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
           eMail: <Norbert@...160...>