<div dir="ltr">Dear VTK users,<div><br></div><div>I'm trying to draw a line chart with different colored line segments, but have been unsuccessful so far. I can get the points to display in different color (code below), is there a way to color the line segments individually as well? I'm using vtkChartXY and vtkPlot at the moment.</div>
<div><br></div><div><div>vtkSmartPointer<vtkChartXY> chart = vtkSmartPointer<vtkChartXY>::New();</div><div>vtkPlot *points = chart->AddPlot(vtkChart::LINE);<br></div></div><div><div>vtkPlotLine::SafeDownCast(points)->SetInput(table,0,1); //table is some vtkTable with point data<br>
</div><div>vtkPlotLine::SafeDownCast(points)->SetScalarVisibility(1);</div><div>vtkPlotLine::SafeDownCast(points)->SelectColorArray(1);</div><div>vtkPlotLine::SafeDownCast(points)->SetLookupTable(lut);</div></div>
<div><br></div><div style>Thanks</div><div style>-Raine</div><div style><br></div></div>