[vtkusers] vtkXYPlot Points and Lines again...

Paul Cochrane cochrane at esscc.uq.edu.au
Thu Apr 14 23:23:36 EDT 2005


Beau,
> 
> Now I've found that I can plot only points or only lines using the
> PlotPointsOn() PlotPointsOff() PlotLinesOn() and PlotLinesOff() functions.
> But these affect the plot globally, I'd like to plot only points for a given
> input and only lines for another input.  
After much mucking around and a bit of "use the source Luke", I found out a
few things you might be interested in.

 - PlotPointsOn/Off() and PlotLinesOn/Off() set the plotting of points
   (lines) on/off *globally*.
 - PlotCurvePointsOn/Off() and PlotCurveLinesOn/Off() set the plotting of
   points (lines) *for each curve individually*. [1]

You can check these things out by printing the object.  In python one can
just use the "print" command, and in C++ one can use the PrintSelf() (or
possibly Print() as well, not sure about that) functions.  ie

plot = vtk.vtkXYPlotActor()
... <other code>
print plot

However, I still haven't been able to plot points for one curve, and lines
for another.  One thing to note as well, which isn't obvious, is that one
has to set PlotPointsOff() and PlotLinesOff() before setting
PlotCurvePointsOn() and then calling SetPlotPoints(int i, int) for each
curve you want to display.

I know this information doesn't help you do what you want to do, but
hopefully it helps in some way.

Regards,

Paul

[1] One caveat here: I haven't been able to get one curve to be points and
one to be lines, I can, however, turn on/off which curve shows, and whether
or not they are all shown with points/lines by using the 
SetPoints(int i, int)/SetLines(int i, int) functions.  Some docs on these
functions would be really helpful.  When I get the time, I'll submit a
patch.

> 
> I'm assuming that SetPlotPoints(int i,int) and SetPlotLines(int i, int)
> would do this.... Since they're not documented I imagine that one of the
> arguments the input index, like with SetPlotColor(), the other is a boolean.
> But so far calling these functions has no effect. Anyone else know what
> these functions are for or what functions I should be using to accomplish
> this?

> 
> Beau
> 
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Paul Cochrane
Computational Scientist/Software Developer
Earth Systems Science Computational Centre
Rm 703, SMI Building
University of Queensland
Brisbane
Queensland 4072
Australia




More information about the vtkusers mailing list