From: Michael French on 29 Jul 2010 21:32 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 29 Jul 2010 23:29 "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 29 Jul 2010 23:45 "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 29 Jul 2010 23:49 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.
|
Pages: 1 Prev: saving different variables Next: Python Tutorial 10 – Nested data structures |