VTKFIG  0.20.20181114
Easy VTK based in situ visualization
void vtkfig::XYPlot::RTPreRender ( )
finaloverrideprivatevirtual

Pre render actions.

Reimplemented from vtkfig::Figure.

Definition at line 516 of file vtkfigXYPlot.cxx.

517  {
518  XYPlotActor->SetXLabelFormat(PlotState.ylabel_format);
519  XYPlotActor->SetYLabelFormat(PlotState.ylabel_format);
520  XYPlotActor->SetTitle(title.c_str());
521  XYPlotActor->SetXTitle(xtitle.c_str());
522  XYPlotActor->SetYTitle(ytitle.c_str());
523 
524 
525  XYPlotActor->SetLineWidth(2.0*PlotState.line_width);
526  XYPlotActor->SetGlyphSize(0.01*PlotState.marker_size);
527  PlotGrid();
528 
529  if (PlotState.legend_show)
530  {
531  this->LegendActor->SetNumberOfEntries(num_plots);
532  this->LegendActor->SetPadding(2);
533  for (int iplot=0;iplot<num_plots;iplot++)
534  {
535  int ds_num=AllPlotData[iplot].GetDataSetNumber();
536  this->LegendActor->SetEntryString(iplot,XYPlotActor->GetPlotLabel(ds_num));
537  this->LegendActor->SetEntryColor(iplot, XYPlotActor->GetPlotColor(ds_num));
538  auto symbol=XYPlotActor->GetPlotSymbol(ds_num);
539  if (symbol)
540  this->LegendActor->SetEntrySymbol(iplot,symbol);
541 
542  }
543  this->LegendActor->Modified();
544  }
545  }
std::string xtitle
Definition: vtkfigXYPlot.h:187
struct vtkfig::XYPlot::@4 PlotState
General state of the XYPlot.
vtkSmartPointer< vtkXYPlotActor > XYPlotActor
The main graphics actor.
Definition: vtkfigXYPlot.h:175
vtkSmartPointer< vtkLegendBoxActor > LegendActor
We create our own legend box.
Definition: vtkfigXYPlot.h:180
size_t num_plots
Number of "real" plots.
Definition: vtkfigXYPlot.h:166
std::vector< PlotData > AllPlotData
vector holding data of all plots
Definition: vtkfigXYPlot.h:227
std::string title
Definition: vtkfigXYPlot.h:185
void PlotGrid()
Plot the label grid.
std::string ytitle
Definition: vtkfigXYPlot.h:186

+ Here is the call graph for this function: