@@ -0,0 +1,2132 @@
+#!/usr/bin/env python%0A%0A# Run this test like so:%0A# vtkpython TestLinePlot.py  -D $VTK_DATA_ROOT %5C%0A# -B $VTK_DATA_ROOT/Baseline/Charts/%0A%0Aimport os%0Aimport vtk%0Aimport vtk.test.Testing%0Aimport math%0A%0Aclass TestLinePlot(vtk.test.Testing.vtkTest):%0A    def testLinePlot(self):%0A        %22Test if line plots can be built with python%22%0A%0A        # Set up a 2D scene, add an XY chart to it%0A        view = vtk.vtkContextView()%0A        view.GetRenderer().SetBackground(1.0,1.0,1.0)%0A        view.GetRenderWindow().SetSize(400,300)%0A        chart = vtk.vtkChartXY()%0A        view.GetScene().AddItem(chart)%0A%0A        # Create a table with some points in it%0A        table = vtk.vtkTable()%0A%0A        arrX = vtk.vtkFloatArray()%0A        arrX.SetName(%22X Axis%22)%0A%0A        arrC = vtk.vtkFloatArray()%0A        arrC.SetName(%22Cosine%22)%0A%0A        arrS = vtk.vtkFloatArray()%0A        arrS.SetName(%22Sine%22)%0A%0A        arrS2 = vtk.vtkFloatArray()%0A        arrS2.SetName(%22Sine2%22)%0A%0A        numPoints = 69%0A        inc = 7.5 / (numPoints - 1)%0A%0A        for i in range(0,numPoints):%0A            arrX.InsertNextValue(i*inc)%0A            arrC.InsertNextValue(math.cos(i * inc) + 0.0)%0A            arrS.InsertNextValue(math.sin(i * inc) + 0.0)%0A            arrS2.InsertNextValue(math.sin(i * inc) + 0.5)%0A%0A        table.AddColumn(arrX)%0A        table.AddColumn(arrC)%0A        table.AddColumn(arrS)%0A        table.AddColumn(arrS2)%0A%0A        # Now add the line plots with appropriate colors%0A        line = chart.AddPlot(0)%0A        line.SetInput(table,0,1)%0A        line.SetColor(0,255,0,255)%0A        line.SetWidth(1.0)%0A%0A        line = chart.AddPlot(0)%0A        line.SetInput(table,0,2)%0A        line.SetColor(255,0,0,255);%0A        line.SetWidth(5.0)%0A%0A        line = chart.AddPlot(0)%0A        line.SetInput(table,0,3)%0A        line.SetColor(0,0,255,255);%0A        line.SetWidth(4.0)%0A%0A        view.GetRenderWindow().SetMultiSamples(0)%0A%0A        img_file = %22TestLinePlot.png%22%0A        vtk.test.Testing.compareImage(view.GetRenderWindow(),vtk.test.Testing.getAbsImagePath(img_file),threshold=25)%0A        vtk.test.Testing.interact()%0A%0Aif __name__ == %22__main__%22:%0A    vtk.test.Testing.main(%5B(TestLinePlot, 'test')%5D)%0A

Add Python LinePlot Charts Test