[vtkusers] vtkChartXY How to remove a specific vtkPlot in it?

Guan, Xuefei xf.guan at gmail.com
Fri Aug 2 22:21:25 EDT 2013


Dear VTK users,

I browsed the vtkChartXY function lists, the only available function to
remove a line in it is by RemovePlot(vtkIdType)

My question is how to get the index from an existing vtkPlot *,

For example, I use the following snip and a for loop to draw a large set of
lines

vtkPlot* pcPlot = m_pcChartXY->AddPlot(vtkChart::LINE);
pcPlot->SetColor(r, g, b);
pcPlot->SetWidth(1);
pcPlot->SetInput(pcDataTable, i, j);
pcPlot->SetLabel("");

Then I want to delete a specific line in the chart, how to do that using a
given vtkPlot* pcPlot? Or if I want to use RemovePlot(vtkIdType) to delete
a specific line, how to get the required index from a given vtkPlot*
pcPlot?

Is the line id is a linear integer starting from 0?

Thanks for your help.

Regards,
xf.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130802/69c74097/attachment.htm>


More information about the vtkusers mailing list