Default implementation for 2D/3d datasets.
83 auto coordsys=vtkSmartPointer<CoordSystemActor>::New();
84 coordsys->SetUse2DMode(1);
85 coordsys->SetBounds(0,1,0.001,100,0,0);
88 coordsys->SetXTitle(
"x");
89 coordsys->SetXUnits(
"cm");
90 coordsys->SetYTitle(
"y");
96 coordsys->SetCamera(renderer->GetActiveCamera());
100 Figure::RTAddActor(coordsys);
104 auto polyLinePoints = vtkSmartPointer<vtkPoints>::New();
105 auto polyLine = vtkSmartPointer<vtkPolyLine>::New();
107 polyLinePoints->SetNumberOfPoints(N);
108 polyLine->GetPointIds()->SetNumberOfIds(N);
113 for (
int i=0;i<N;i++,x+=h)
115 polyLinePoints->InsertPoint(i, x, exp(sin(10.0*x)), 0);
116 polyLine->GetPointIds()->SetId(i,i);
119 auto polyLineGrid = vtkSmartPointer<vtkUnstructuredGrid>::New();
120 polyLineGrid->Allocate(1, 1);
121 polyLineGrid->InsertNextCell(polyLine->GetCellType(), polyLine->GetPointIds());
122 polyLineGrid->SetPoints(polyLinePoints);
124 auto polyLineMapper = vtkSmartPointer<vtkDataSetMapper>::New();
125 polyLineMapper->SetInputData(polyLineGrid);
127 auto polyLineActor =vtkSmartPointer<vtkActor>::New();
128 polyLineActor->SetMapper(polyLineMapper);
129 polyLineActor->GetProperty()->SetColor(1,0,0);
130 polyLineActor->GetProperty()->SetLineWidth(2.5);
131 polyLineActor->GetProperty()->BackfaceCullingOn();
133 Figure::RTAddActor(polyLineActor);
135 auto lbox=vtkSmartPointer<vtkLegendBoxActor>::New();