[vtkusers] vtkXYPlotActor

flory florysf at gmail.com
Tue Jun 10 08:36:41 EDT 2008


Hello everyone,

      I use vtkXYPlotActor to plot two lines on the same canvas. I want to
have different drawing modes for the two lines: the first one should display
only the points and the second one should be a simple line. I managed to
change the colors of the two lines but I am not able to change their modes.
Is there any method to do this? I am using Java wrapping and tried the
following code:
            vtXYPlotActor plot = new vtkXYPlotActor();
	    plot.AddDataObjectInput(dataObject1);
	    plot.AddDataObjectInput(dataObject2);

           //set which parts of the data object are to be used for which
axis
	    plot.SetDataObjectXComponent(0, 0);
	    plot.SetDataObjectYComponent(0, 1);
	    plot.SetDataObjectYComponent(1, 1);

           plot.SetPlotColor(0, 0, 0, 1);
	   plot.SetPlotColor(1, 1, 0, 0);

           //change the drawing mode
           plot.SetPlotLines(0,  0);
           plot.setPlotPoints(0, 1);
	   plot.SetPlotLines(1, 0);

The last three lines have no effect. Is something else that should be added
or another approach?
Also could the points be drawn as small circles instead of small squares..or
other geometric shapes?
Thanks a lot!
                  Flory

-- 
View this message in context: http://www.nabble.com/vtkXYPlotActor-tp17754344p17754344.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list