Graphics |
XData and YData
The XData
and YData
properties control the coordinate system of the image. For an m-by-n image, the default XData
is [1 n]
and the default YData
is [1 m]
. These settings imply the following:
produce the following picture.
The XData
and YData
properties of the resulting image object have the default values shown below.
However, you can override the default settings to specify your own coordinate system. For example, the statements
X = [1 2 3 4; 5 6 7 8; 9 10 11 12]; image(X,'XData',[-1 2],'YData',[2 4]); colormap(colorcube(12)) xlabel x; ylabel y
produce the following picture.
Image CDataMapping | EraseMode |
© 1994-2005 The MathWorks, Inc.