Go to the source code of this file.
Definition at line 9 of file 21-numcxx-vtkfigrect1D.cxx.
18 const int N=1+ceil((x1-x0)/h);
19 h=(x1-x0)/(
double)(N-1);
32 auto frame=vtkfig::Frame::New();
33 auto xyplot=vtkfig::XYPlot::New();
34 xyplot->SetPlotColor(1.0,0.0,0.0);
35 xyplot->SetPlotLineType(
"-");
36 xyplot->SetXAxisLabelFormat(
"%3.1f");
37 xyplot->SetYAxisLabelFormat(
"%3.1f");
38 frame->AddFigure(xyplot);
45 for (
int i=0; i<N; i++)
47 U(i)=sin(20.0*(X(i)-t));
51 snprintf(titlebuf,20,
"t=%g",t);
53 xyplot->SetTitle(titlebuf);
One dimensional array class.