Skip to content

Surprise when mapping matrix to image

2 messages · Glynn, Earl, Brian Ripley

#
On Thu, 26 Aug 2004, Glynn, Earl wrote:

            
It's pure convention: see below.
Did you try reading the help for image?  You don't seem to understand it
if you actually did.  It seems you are looking for

	image(t(x)[ncol(x):1, ])

Easy!

Mathematical conventions are just that, conventions.  They differ by field 
of mathematics.  Don't ask us why matrix rows are numbered down but graphs 
are numbered up the y axis, nor why x comes before y but row before 
column.  But the matrix layout has always seemed illogical to me.