<div dir="ltr">Dear VTK users,<div><br></div><div>I&#39;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&#39;m using vtkChartXY and vtkPlot at the moment.</div>


<div><br></div><div><div>vtkSmartPointer&lt;vtkChartXY&gt; chart = vtkSmartPointer&lt;vtkChartXY&gt;::New();</div><div>vtkPlot *points = chart-&gt;AddPlot(vtkChart::LINE);<br></div></div><div><div>vtkPlotLine::SafeDownCast(points)-&gt;SetInput(table,0,1); //table is some vtkTable with point data<br>

</div><div>vtkPlotLine::SafeDownCast(points)-&gt;SetScalarVisibility(1);</div><div>vtkPlotLine::SafeDownCast(points)-&gt;SelectColorArray(1);</div><div>vtkPlotLine::SafeDownCast(points)-&gt;SetLookupTable(lut);</div></div>

<div><br></div><div style>Thanks</div><div style>-Raine</div><div style><br></div></div>