help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plotting 3D discrete points


From: soren
Subject: Re: Plotting 3D discrete points
Date: Mon, 19 May 2008 11:08:15 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.2-RC1)

Quoting Oren Spector <address@hidden>:
I use plot3 in order to visualize this set. If I use plot3( bd( :, 1
), bd( :, 2 ), bd( :, 3 ) ) Octave connects the points in the order in
which they appear in the matrix. But, I want to plot the set as
discete points. I found that by using plot3( bd( :, 1 ), bd( :, 2 ),
bd( :, 3 ), '+' ) I get a discrete plot, but each point appears as a
'+' sign, which makes the plot cumbersome. How can I plot the set as
discrete point, where each point appears as a dot?

Instead of "+", you could use "o" or "*"

Since the boundary I'm plotting is a closed surface I wish to use
different colors to ease its viewing. I want something similar to a
topographic map, in which different values in the Z-axis are colored
differently. Is there a simple method of doing that in Octave?

I guess that depends on your definition of simple :-) The easiest thing I can think of is plotting each point separatly in different colors. Something like this

  figure
  N = 10;
  x = rand (1, N);
  y = rand (1, N);
  z = rand (1, N);
  hold on
  for k = 1:N
plot3 (x (k), y(k), z(k), "Marker", "*", "color", [1, z(k), 0], "Linestyle", "hidden")
  endfor
  hold off

Søren




reply via email to

[Prev in Thread] Current Thread [Next in Thread]