18   frame->SetLayout(0,0);
    22   const double t_low = 0;
    23   const double t_upp = 5;
    24   const double dt = (t_upp-t_low)/(NN-1);
    27   std::vector<double> x1(NN);
    28   std::vector<double> y1(NN);
    29   std::vector<double> x2(NN);
    30   std::vector<double> y2(NN);
    40   double t0=(double)clock()/(double)CLOCKS_PER_SEC;
    42   auto chartxy=vtkfig::ChartXY::New();
    44   frame->AddFigure(chartxy);
    51     for (
int i=0; i<NN; i++)
    56       y2[i] = cos(t)*(0.1-t);
    62     snprintf(titlebuf,20,
"frame %lu",ii++);
    64     chartxy->Title(titlebuf);
    65     chartxy->LineColorRGB(0,0,1);
    66     chartxy->LineType(
"-");
    67     chartxy->AddPlot(x1, y1);
    68     chartxy->LineColorRGB(1,0,0);
    69     chartxy->LineType(
".-");
    70     chartxy->AddPlot(x2, y2);
    77         frame->WritePNG(
"example-chartxy.png");
    79     double t1=(double)clock()/(double)CLOCKS_PER_SEC;
    83       printf(
"Frame rate: %.2f fps\n",(
double)(i1-i0)/4.0);
    85       t0=(double)clock()/(double)CLOCKS_PER_SEC;
 
static std::shared_ptr< Frame > New()
Create frame with multiple subframes. 
 
Define Frame class providing a window for rendering.