<div dir="ltr">I normally use <div><br></div><div>pcChartXY->RemovePlotInstance(pcPlot)</div><div><br></div><div>However I had strange behavior when I try to add and remove plot in corner 0 (see here: <a href="http://vtk.1045678.n5.nabble.com/vtkChartXY-Cannot-add-and-then-remove-vtkPlotBar-from-corner-0-VTK6-0-td5722329.html" target="_blank">http://vtk.1045678.n5.nabble.com/vtkChartXY-Cannot-add-and-then-remove-vtkPlotBar-from-corner-0-VTK6-0-td5722329.html</a>)</div>
<div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 7:21 PM, Guan, Xuefei <span dir="ltr"><<a href="mailto:xf.guan@gmail.com" target="_blank">xf.guan@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 dir="ltr">Dear VTK users,<div><br></div><div>I browsed the vtkChartXY function lists, the only available function to remove a line in it is by RemovePlot(vtkIdType)</div>
<div><br></div><div>My question is how to get the index from an existing vtkPlot *, </div>
<div><br></div><div>For example, I use the following snip and a for loop to draw a large set of lines</div><div><br></div><div><div><span style="white-space:pre-wrap"> </span>vtkPlot* pcPlot = m_pcChartXY->AddPlot(vtkChart::LINE);</div>
<div><span style="white-space:pre-wrap"> </span>pcPlot->SetColor(r, g, b);</div><div><span style="white-space:pre-wrap"> </span>pcPlot->SetWidth(1);</div><div><span style="white-space:pre-wrap"> </span>pcPlot->SetInput(pcDataTable, i, j);</div>
<div><span style="white-space:pre-wrap"> </span>pcPlot->SetLabel("");</div></div><div><br></div><div>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? </div>
<div><br></div><div>Is the line id is a linear integer starting from 0? </div><div><br></div><div>Thanks for your help.</div><div><br></div><div>Regards,</div><div>xf.</div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div>