94 #ifndef vtkXYPlotActor_h
95 #define vtkXYPlotActor_h
97 #define VTK_XYPLOT_INDEX 0
98 #define VTK_XYPLOT_ARC_LENGTH 1
99 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
100 #define VTK_XYPLOT_VALUE 3
102 #define VTK_XYPLOT_ROW 0
103 #define VTK_XYPLOT_COLUMN 1
105 #define VTK_XYPLOT_Y_AXIS_TOP 0
106 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
107 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
109 #include "vtkRenderingAnnotationModule.h"
113 class vtkXYPlotActorConnections;
176 this->RemoveDataSetInputConnection(in,
nullptr, 0);
184 void RemoveAllDataSetInputConnections();
191 void SetPointComponent(
int i,
int comp);
192 int GetPointComponent(
int i);
208 vtkGetMacro(XValues,
int);
214 const char *GetXValuesAsString();
245 vtkGetMacro(DataObjectPlotMode,
int);
250 const char *GetDataObjectPlotModeAsString();
262 void SetDataObjectXComponent(
int i,
int comp);
263 int GetDataObjectXComponent(
int i);
275 void SetDataObjectYComponent(
int i,
int comp);
276 int GetDataObjectYComponent(
int i);
285 void SetPlotColor(
int i,
double r,
double g,
double b);
291 void SetPlotLabel(
int i,
const char *label);
292 const char *GetPlotLabel(
int i);
305 void SetPlotLines(
int i,
int);
306 int GetPlotLines(
int i);
308 void SetPlotPoints(
int i,
int);
309 int GetPlotPoints(
int i);
359 vtkSetStringMacro(Title);
360 vtkGetStringMacro(Title);
367 vtkSetStringMacro(XTitle);
368 vtkGetStringMacro(XTitle);
375 virtual void SetYTitle(
const char* );
403 vtkSetVector2Macro(XRange,
double);
404 vtkGetVectorMacro(XRange,
double,2);
405 vtkSetVector2Macro(YRange,
double);
406 vtkGetVectorMacro(YRange,
double,2);
408 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
418 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
419 vtkGetMacro(NumberOfXLabels,
int);
420 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
421 vtkGetMacro(NumberOfYLabels,
int);
423 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
434 void SetAdjustXLabels(
int adjust);
435 vtkGetMacro( AdjustXLabels,
int );
436 void SetAdjustYLabels(
int adjust);
437 vtkGetMacro( AdjustYLabels,
int );
444 void SetNumberOfXMinorTicks(
int num);
445 int GetNumberOfXMinorTicks();
446 void SetNumberOfYMinorTicks(
int num);
447 int GetNumberOfYMinorTicks();
466 vtkSetVector2Macro(TitlePosition,
double);
467 vtkGetVector2Macro(TitlePosition,
double);
487 AlignAxisLeft = 0x100,
488 AlignAxisRight = 0x200,
489 AlignAxisHCenter = 0x400,
490 AlignAxisTop = 0x1000,
491 AlignAxisBottom = 0x2000,
492 AlignAxisVCenter = 0x4000
503 vtkSetMacro(AdjustTitlePositionMode,
int);
504 vtkGetMacro(AdjustTitlePositionMode,
int);
516 vtkSetVector2Macro(LegendPosition,
double);
517 vtkGetVector2Macro(LegendPosition,
double);
518 vtkSetVector2Macro(LegendPosition2,
double);
519 vtkGetVector2Macro(LegendPosition2,
double);
562 virtual void SetLabelFormat (
const char* );
565 return this->GetXLabelFormat();
573 virtual void SetXLabelFormat (
const char* );
574 vtkGetStringMacro(XLabelFormat);
581 virtual void SetYLabelFormat (
const char* );
582 vtkGetStringMacro(YLabelFormat);
590 vtkSetClampMacro(Border,
int, 0, 50);
591 vtkGetMacro(Border,
int);
621 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
622 vtkGetMacro(GlyphSize,
double);
629 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
637 void ViewportToPlotCoordinate(
vtkViewport *viewport);
638 vtkSetVector2Macro(PlotCoordinate,
double);
639 vtkGetVector2Macro(PlotCoordinate,
double);
645 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
654 void PlotToViewportCoordinate(
vtkViewport *viewport);
655 vtkSetVector2Macro(ViewportCoordinate,
double);
656 vtkGetVector2Macro(ViewportCoordinate,
double);
663 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
703 vtkSetMacro(ReferenceXValue,
double);
704 vtkGetMacro(ReferenceXValue,
double);
720 vtkSetMacro(ReferenceYValue,
double);
721 vtkGetMacro(ReferenceYValue,
double);
732 void PrintAsCSV(ostream &os);
761 void SetXTitlePosition(
double position);
762 double GetXTitlePosition();
769 vtkSetMacro(YTitlePosition,
int);
770 vtkGetMacro(YTitlePosition,
int);
789 virtual void SetPlotGlyphType(
int,
int );
790 virtual void SetLineWidth(
double );
791 virtual void AddUserCurvesPoint(
double,
double,
double );
792 virtual void RemoveAllActiveCurves();
799 virtual void SetLegendBorder(
int );
800 virtual void SetLegendBox(
int );
801 virtual void SetLegendUseBackground(
int );
802 virtual void SetLegendBackgroundColor(
double,
double,
double );
809 virtual void SetTitleColor(
double,
double,
double );
810 virtual void SetTitleFontFamily(
int );
811 virtual void SetTitleBold(
int );
812 virtual void SetTitleItalic(
int );
813 virtual void SetTitleShadow(
int );
814 virtual void SetTitleFontSize(
int );
815 virtual void SetTitleJustification(
int );
816 virtual void SetTitleVerticalJustification(
int );
823 virtual void SetXAxisColor(
double,
double,
double );
824 virtual void SetYAxisColor(
double,
double,
double );
831 virtual void SetAxisTitleColor(
double,
double,
double );
832 virtual void SetAxisTitleFontFamily(
int );
833 virtual void SetAxisTitleBold(
int );
834 virtual void SetAxisTitleItalic(
int );
835 virtual void SetAxisTitleShadow(
int );
836 virtual void SetAxisTitleFontSize(
int );
837 virtual void SetAxisTitleJustification(
int );
838 virtual void SetAxisTitleVerticalJustification(
int );
845 virtual void SetAxisLabelColor(
double,
double,
double );
846 virtual void SetAxisLabelFontFamily(
int );
847 virtual void SetAxisLabelBold(
int );
848 virtual void SetAxisLabelItalic(
int );
849 virtual void SetAxisLabelShadow(
int );
850 virtual void SetAxisLabelFontSize(
int );
851 virtual void SetAxisLabelJustification(
int );
852 virtual void SetAxisLabelVerticalJustification(
int );
874 double XComputedRange[2];
875 double YComputedRange[2];
887 double TitlePosition[2];
900 double ViewportCoordinate[2];
901 double PlotCoordinate[2];
919 void InitializeEntries();
924 double LegendPosition[2];
925 double LegendPosition2[2];
955 void ComputeXRange(
double range[2],
double *lengths);
956 void ComputeYRange(
double range[2]);
957 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
959 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
960 double yRange[2],
double *norms,
961 int numDS,
int numDO);
962 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
963 void GenerateClipPlanes(
int *pos,
int *pos2);
964 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
965 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
966 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
981 const char* arrayName,