Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
visualize 3d data with given values for each point

Subject: visualize 3d data with given values for each point

From: Rick

Date: 23 Dec, 2010 15:52:05

Message: 1 of 3

I have 2002 points with their X,Y,Z coordinates, and a different value Q(i) for each point i . (so [X Y Z Q] would be 2002 x 4 large, each row gives the X,Y,Z coordinate and a value Q for that point)
Q is nonzero (typically it has values between 0.0002 and 0.0010)

I want to visualize this data somehow in a 3Dplot. What I want to have is something like the following:
plot3(X,Y,Z) %plot the points (you see 2002 points in a box)

at each of the 2002 points assign the value Q(i). I was thinking about either assign a color to Q(i) (say, low Q(i) means lighter color and high Q(i) means higher color) and then put this in the plot.

this step is where i got stuck. I seem not to be able to find any information in the manual or FAQ about how to do this. Any help or pointers of where i can find information about this would be very welcome and appreciated.

Rick

PS:
Another approach might be to assign different sizes of spheres at each point (so a small sphere at a point i corresponds with a low value of Q). But I think the 'colormethod' would be more intuitive for the project i am working on. (Background info: the values of Q represent a quantity that resides in points i, and by means of coloring i would like to visualize how Q is distributed along all points)

Subject: visualize 3d data with given values for each point

From: Sean de

Date: 23 Dec, 2010 15:59:07

Message: 2 of 3

"Rick " <RickVooys.removeitall@gmail.com> wrote in message <ievr75$c5m$1@fred.mathworks.com>...
> I have 2002 points with their X,Y,Z coordinates, and a different value Q(i) for each point i . (so [X Y Z Q] would be 2002 x 4 large, each row gives the X,Y,Z coordinate and a value Q for that point)
> Q is nonzero (typically it has values between 0.0002 and 0.0010)
>
> I want to visualize this data somehow in a 3Dplot. What I want to have is something like the following:
> plot3(X,Y,Z) %plot the points (you see 2002 points in a box)
>
> at each of the 2002 points assign the value Q(i). I was thinking about either assign a color to Q(i) (say, low Q(i) means lighter color and high Q(i) means higher color) and then put this in the plot.
>
> this step is where i got stuck. I seem not to be able to find any information in the manual or FAQ about how to do this. Any help or pointers of where i can find information about this would be very welcome and appreciated.
>
> Rick
>
> PS:
> Another approach might be to assign different sizes of spheres at each point (so a small sphere at a point i corresponds with a low value of Q). But I think the 'colormethod' would be more intuitive for the project i am working on. (Background info: the values of Q represent a quantity that resides in points i, and by means of coloring i would like to visualize how Q is distributed along all points)

a few hints:
doc plot3
doc scatter3
doc colormap

Subject: visualize 3d data with given values for each point

From: Rick

Date: 26 Dec, 2010 12:43:02

Message: 3 of 3

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <ievrkb$97p$1@fred.mathworks.com>...
> "Rick " <RickVooys.removeitall@gmail.com> wrote in message <ievr75$c5m$1@fred.mathworks.com>...
> > I have 2002 points with their X,Y,Z coordinates, and a different value Q(i) for each point i . (so [X Y Z Q] would be 2002 x 4 large, each row gives the X,Y,Z coordinate and a value Q for that point)
> > Q is nonzero (typically it has values between 0.0002 and 0.0010)
> >
> > I want to visualize this data somehow in a 3Dplot. What I want to have is something like the following:
> > plot3(X,Y,Z) %plot the points (you see 2002 points in a box)
> >
> > at each of the 2002 points assign the value Q(i). I was thinking about either assign a color to Q(i) (say, low Q(i) means lighter color and high Q(i) means higher color) and then put this in the plot.
> >
> > this step is where i got stuck. I seem not to be able to find any information in the manual or FAQ about how to do this. Any help or pointers of where i can find information about this would be very welcome and appreciated.
> >
> > Rick
> >
> > PS:
> > Another approach might be to assign different sizes of spheres at each point (so a small sphere at a point i corresponds with a low value of Q). But I think the 'colormethod' would be more intuitive for the project i am working on. (Background info: the values of Q represent a quantity that resides in points i, and by means of coloring i would like to visualize how Q is distributed along all points)
>
> a few hints:
> doc plot3
> doc scatter3
> doc colormap



HOW could i have missed scatter3? Thanks a lot! :-D

scatter3(X,Y,Z,6,Q) gives exactly what i wanted.

Happy holidays!




This question has been answered, and can be closed now.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us