Convention for rows/columns in images??

Dear all,

I am facing a confusing issue when handling pictures and treating them as 2D-waves.

Take the picture I attached as an example.

When I read out its information via "Browse Waves", I get that my picture has 82 rows and 115 columns. But this contradicts with the image plot?! (There it is the other way around)

When I am handling the image in procedures and functions, it also behaves like it has 82 rows and 115 columns.

But WHY is this and what can I do that the image plot truly resembles the 2D-wave??

Thanks a lot in advance!

Best regards,
Peter
That's just the way it is. There's probably a 'good reason' or at least an arbitrary historical convention for it, but that's not really going to change anything at any rate. Bothers me to no end as well, but eventually you get used to it. Its especially fun when you are manually editing/checking numerical values while looking at a complex graph.
PeterR wrote:
what can I do that the image plot truly resembles the 2D-wave??


If you wanted your image matrix (e.g. M_Image) displayed to match the orientation that it would have in a table, you could use:

Display
Appendimage M_Image
ModifyGraph swapXY=1
SetAxis/A/R left


Not sure if there is a one-liner for this….
Ok, thanks for the enlightenment!

Well, it's really confusing, but now I know we have to live with that. :)

I will just rotate my image plots with the snippet provided by ChrLie and that should do it.

Thanks again!

Yeah you can save that code into a little function that will do it for you from the command prompt, would be easy to have it work on the top window so you dont have to type the image name, and you might even be able to tie it into the display command automatically (but thats beyond my skill).

In the end tho, I found it was easier to just get used to it.
PeterR wrote:
Well, it's really confusing, but now I know we have to live with that. :)


It can be confusing, but it is a rational choice: Igor associates the rows dimension with x and the columns dimension with y. For example, think about the wave scaling dialog or the 'magical' "x" and "y" variables in wave assignments. To keep everything consistent Igor uses the x axis for rows, and the y axis for columns when displaying images.

I never swap x and y axes for image plots because it tends to lead to confusion. For the same reason I would suggest that you simply become used to Igor's convention instead.