[vtkusers] fuzziness on contour plot

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Tue Apr 9 05:04:52 EDT 2002


>>>>> "SPV" == Shwu Ping Vong <svong at email.arc.nasa.gov> writes:

    SPV> Hi everyone, I used the following example code that comes
    SPV> with vtk to test on my data file. (see attachment.  I'm not
    SPV> sure if I will attach it correctly.  So if not, those who
    SPV> have matlab and could help me, my data file just came from
    SPV> running the following in matlab: x=[0.0:0.1:6.28]; y1=sin(x);
    SPV> y2=cos(x); z=y1'*y2;) The data in variable z forms the data
    SPV> of my 'zdata.vtk' that gets passed to
    SPV> vtkStructuredPointsReader.

    SPV> My question is: If you run matlab using surf(z) or
    SPV> contourf(z), you can see clear gradation of colors for the
    SPV> contour plot.  But when I run the vtk codes, the contour plot
    SPV> comes out blurry.  Is there a way to achieve the same kind of
    SPV> gradation of colors as in matlab?

You could try to reduce the number of colors in the lookup table but
that will make your results look worse.  Actually, the values on your
surface are really continuous so matlab is really fooling you if it
creates discrete jumps in the color because the color represents the
local value of your scalar.

prabhu





More information about the vtkusers mailing list