Thank you. But the method in the second link still can't make a 3D plot.
I can draw a color plot and save it as png file and the read this png
file then make a 3D plot. But I think there should be easier way to make
a 3D plot. <div class="yj6qo ajU"><div id=":165" class="ajR" tabindex="0"><img class="ajT" src="images/cleardot.gif"></div></div><br><br><div class="gmail_quote">On Fri, Apr 20, 2012 at 6:25 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_quote"><div><div class="h5">On Fri, Apr 20, 2012 at 5:48 PM, zhixiu li <span dir="ltr"><<a href="mailto:zhixiuli@gmail.com" target="_blank">zhixiuli@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear All,<br>I have a dataset like this (in data.txt)<br>1 0 0<br>2 0 0 <br>1 2 3<br>1 2 3<br>...<br>the 1st column is x and the second col is y. the last column is the attribute of this point. I want to make a 3 D plot for each points(Z will the attribute value). <br>
How do I read this data file to VTK? Thank you very much!<br><br>tianbu<br></blockquote><div><br></div></div></div><div>Using a reader like this: </div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/SimplePointsReader</a></div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Will assume that the 3 values are XYZ coordinates. You can then color the points by their Z value using this:</div><div class="gmail_quote"><br><div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ElevationFilter</a><span class="HOEnZb"><font color="#888888"><br clear="all">
<br>David</font></span></div></div></div>
</blockquote></div><br>