From: Michael French on
Hello,

I have a 3D matrix (X,Y,Z) and i wish to plot a 2D plot of X vs Z, however i wish to colour the points by there Y value. Is it possible? any help will be mostly appreciated
From: Frédéric Bergeron on
"Michael French" <mfrench(a)lesterfranks.com.au> wrote in message <i2ta2k$av7$1(a)fred.mathworks.com>...
> Hello,
>
> I have a 3D matrix (X,Y,Z) and i wish to plot a 2D plot of X vs Z,

Is that a 3D line? or a surface?
because the color properties varies from the type of your plot I think, for example I would use 'color' and 'edgecolor' properties for the line, and 'cdata' and 'facevertexcdata' properties for objects of the patch type ...

> however i wish to colour the points by there Y value. Is it possible? any help will be > mostly appreciated

Tp colour the points... do you do like a linear interpolation for the colours between two predefined colors, or just set any colors for the points of the same Y values?

I suggest you to post an example of your XYZ data and explain a little more your application.
From: Michael French on
"Frédéric Bergeron" <frederic.bergeron(a)logiag.com> wrote in message <i2tgu0$gds$1(a)fred.mathworks.com>...
> "Michael French" <mfrench(a)lesterfranks.com.au> wrote in message <i2ta2k$av7$1(a)fred.mathworks.com>...
> > Hello,
> >
> > I have a 3D matrix (X,Y,Z) and i wish to plot a 2D plot of X vs Z,
>
> Is that a 3D line? or a surface?
> because the color properties varies from the type of your plot I think, for example I would use 'color' and 'edgecolor' properties for the line, and 'cdata' and 'facevertexcdata' properties for objects of the patch type ...
>
> > however i wish to colour the points by there Y value. Is it possible? any help will be > mostly appreciated
>
> Tp colour the points... do you do like a linear interpolation for the colours between two predefined colors, or just set any colors for the points of the same Y values?
>
> I suggest you to post an example of your XYZ data and explain a little more your application.


Ill try to examine by example better, i have measurements of a cylinder which i have 'unwrapped' to be flat. Once unwrapped their Y value relates to there depth in the cyclinder. i am plotting the measurements in an XY scatter which is there X coordinate and there Z coordinate. So i can analyses trends in Z through the depth of the cyclinder i want every point to be coloured by Y Value. Say, at a depth of 50mm the points are yellow, at a depth of 100 they are orange etc. the points are at even 50mm depths so its they can be discrete colours.
From: ImageAnalyst on
On Jul 29, 9:32 pm, "Michael French" <mfre...(a)lesterfranks.com.au>
wrote:
> Hello,
>
> I have a 3D matrix (X,Y,Z) and i wish to plot a 2D plot of X vs Z, however i wish to colour the points by there Y value. Is it possible? any help will be mostly appreciated

----------------------------
How about using the surf() function. See the help for an example on
coloring as a function of height.