octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colour scaling in imshow


From: John W. Eaton
Subject: Re: Colour scaling in imshow
Date: Thu, 20 Jan 2011 02:55:21 -0500

On 20-Jan-2011, Jordi Gutiérrez Hermoso wrote:

| On another note, what imshow and image do about reversing the ydir
| property... and going as far as to have to explain this odd behaviour
| in image's docstring... shouldn't it be the image that's reversed, not
| the y axis?

As I recall, you can't swap the image data or yrange around in the
graphics object for compatibility reasons.  But even if it weren't a
compatibility issue, wouldn't it be confusing if you put something in
to a graphics object and then it was modified when you asked for it
later?

As for the direction of the axis, doesn't it make sense to plot an
array as an image with the elements like this?

    (1,1)  (1,2)  (1,3)
    (2,1)  (2,2)  (2,3)
     ...    ...    ...
    (M,1)   ...   (M,N)

That way the pixels are in the same orientation as what you see when
you look at the values in the terminal window.  So changing the
direction of the y axis makes sense if you want to be able to plot
something else on top of the image according to the coordinates of the
pixels.

I think whatever it is that we are doing with the properties now is
compatible behavior.  But it has been broken a few times now by
various people wanting to swap things around.  I guess we need some
way to test this so people won't accidentally break it again.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]