axhline() and axis()

Unless I send this when I notice it, I'll forget to send it.

    > But I'm not so cold hearted as to hope for any response from
    > John during the early weeks of fatherhood!

No worries - these babies sleep like mad. I get a few minutes a day
to catch up.

    > If a plot makes use of both axhline() and axis(), then
    > axis() must come last or the results are not as expected.
    > Actually I have found it often desirable for axis to come
    > last, but I will simply raise the question of whether this
    > need---possibly surprising to a new user---might be
    > transcended.

Could you send some example code when axis is used first with a
description of what looks wrong to you on the plot?

JDH

from scipy import *
from matplotlib.matlab import *
days=arange(31)
dp = 3
plot(days,dp*days,'ro')
#produce a zero axis
axis([0,30,-40,100])
axhline(linewidth=0.5,color=(0,0,0))
show()

Version is 0.63.
Ordered as above: axis is not honored.
Switch the order of axis() and axhline(),
and all is well.

Hope that's clear.

Cheers,
Alan

···

On Fri, 08 Oct 2004, John Hunter apparently wrote:

Could you send some example code when axis is used first with a
description of what looks wrong to you on the plot?