88 #ifndef vtkXYPlotActor_h
89 #define vtkXYPlotActor_h
91 #define VTK_XYPLOT_INDEX 0
92 #define VTK_XYPLOT_ARC_LENGTH 1
93 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
94 #define VTK_XYPLOT_VALUE 3
96 #define VTK_XYPLOT_ROW 0
97 #define VTK_XYPLOT_COLUMN 1
99 #define VTK_XYPLOT_Y_AXIS_TOP 0
100 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
101 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
103 #include "vtkRenderingAnnotationModule.h"
107 class vtkXYPlotActorConnections;
170 this->RemoveDataSetInputConnection(in,
nullptr, 0);
178 void RemoveAllDataSetInputConnections();
185 void SetPointComponent(
int i,
int comp);
186 int GetPointComponent(
int i);
202 vtkGetMacro(XValues,
int);
208 const char *GetXValuesAsString();
239 vtkGetMacro(DataObjectPlotMode,
int);
244 const char *GetDataObjectPlotModeAsString();
256 void SetDataObjectXComponent(
int i,
int comp);
257 int GetDataObjectXComponent(
int i);
269 void SetDataObjectYComponent(
int i,
int comp);
270 int GetDataObjectYComponent(
int i);
279 void SetPlotColor(
int i,
double r,
double g,
double b);
285 void SetPlotLabel(
int i,
const char *label);
286 const char *GetPlotLabel(
int i);
299 void SetPlotLines(
int i,
int);
300 int GetPlotLines(
int i);
302 void SetPlotPoints(
int i,
int);
303 int GetPlotPoints(
int i);
353 vtkSetStringMacro(Title);
354 vtkGetStringMacro(Title);
361 vtkSetStringMacro(XTitle);
362 vtkGetStringMacro(XTitle);
369 virtual void SetYTitle(
const char* );
397 vtkSetVector2Macro(XRange,
double);
398 vtkGetVectorMacro(XRange,
double,2);
399 vtkSetVector2Macro(YRange,
double);
400 vtkGetVectorMacro(YRange,
double,2);
402 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
412 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
413 vtkGetMacro(NumberOfXLabels,
int);
414 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
415 vtkGetMacro(NumberOfYLabels,
int);
417 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
428 void SetAdjustXLabels(
int adjust);
429 vtkGetMacro( AdjustXLabels,
int );
430 void SetAdjustYLabels(
int adjust);
431 vtkGetMacro( AdjustYLabels,
int );
438 void SetNumberOfXMinorTicks(
int num);
439 int GetNumberOfXMinorTicks();
440 void SetNumberOfYMinorTicks(
int num);
441 int GetNumberOfYMinorTicks();
460 vtkSetVector2Macro(TitlePosition,
double);
461 vtkGetVector2Macro(TitlePosition,
double);
481 AlignAxisLeft = 0x100,
482 AlignAxisRight = 0x200,
483 AlignAxisHCenter = 0x400,
484 AlignAxisTop = 0x1000,
485 AlignAxisBottom = 0x2000,
486 AlignAxisVCenter = 0x4000
497 vtkSetMacro(AdjustTitlePositionMode,
int);
498 vtkGetMacro(AdjustTitlePositionMode,
int);
510 vtkSetVector2Macro(LegendPosition,
double);
511 vtkGetVector2Macro(LegendPosition,
double);
512 vtkSetVector2Macro(LegendPosition2,
double);
513 vtkGetVector2Macro(LegendPosition2,
double);
556 virtual void SetLabelFormat (
const char* );
559 return this->GetXLabelFormat();
567 virtual void SetXLabelFormat (
const char* );
568 vtkGetStringMacro(XLabelFormat);
575 virtual void SetYLabelFormat (
const char* );
576 vtkGetStringMacro(YLabelFormat);
584 vtkSetClampMacro(Border,
int, 0, 50);
585 vtkGetMacro(Border,
int);
615 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
616 vtkGetMacro(GlyphSize,
double);
623 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
631 void ViewportToPlotCoordinate(
vtkViewport *viewport);
632 vtkSetVector2Macro(PlotCoordinate,
double);
633 vtkGetVector2Macro(PlotCoordinate,
double);
639 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
648 void PlotToViewportCoordinate(
vtkViewport *viewport);
649 vtkSetVector2Macro(ViewportCoordinate,
double);
650 vtkGetVector2Macro(ViewportCoordinate,
double);
657 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
697 vtkSetMacro(ReferenceXValue,
double);
698 vtkGetMacro(ReferenceXValue,
double);
714 vtkSetMacro(ReferenceYValue,
double);
715 vtkGetMacro(ReferenceYValue,
double);
726 void PrintAsCSV(ostream &os);
755 void SetXTitlePosition(
double position);
756 double GetXTitlePosition();
763 vtkSetMacro(YTitlePosition,
int);
764 vtkGetMacro(YTitlePosition,
int);
783 virtual void SetPlotGlyphType(
int,
int );
784 virtual void SetLineWidth(
double );
785 virtual void AddUserCurvesPoint(
double,
double,
double );
786 virtual void RemoveAllActiveCurves();
793 virtual void SetLegendBorder(
int );
794 virtual void SetLegendBox(
int );
795 virtual void SetLegendUseBackground(
int );
796 virtual void SetLegendBackgroundColor(
double,
double,
double );
803 virtual void SetTitleColor(
double,
double,
double );
804 virtual void SetTitleFontFamily(
int );
805 virtual void SetTitleBold(
int );
806 virtual void SetTitleItalic(
int );
807 virtual void SetTitleShadow(
int );
808 virtual void SetTitleFontSize(
int );
809 virtual void SetTitleJustification(
int );
810 virtual void SetTitleVerticalJustification(
int );
817 virtual void SetXAxisColor(
double,
double,
double );
818 virtual void SetYAxisColor(
double,
double,
double );
825 virtual void SetAxisTitleColor(
double,
double,
double );
826 virtual void SetAxisTitleFontFamily(
int );
827 virtual void SetAxisTitleBold(
int );
828 virtual void SetAxisTitleItalic(
int );
829 virtual void SetAxisTitleShadow(
int );
830 virtual void SetAxisTitleFontSize(
int );
831 virtual void SetAxisTitleJustification(
int );
832 virtual void SetAxisTitleVerticalJustification(
int );
839 virtual void SetAxisLabelColor(
double,
double,
double );
840 virtual void SetAxisLabelFontFamily(
int );
841 virtual void SetAxisLabelBold(
int );
842 virtual void SetAxisLabelItalic(
int );
843 virtual void SetAxisLabelShadow(
int );
844 virtual void SetAxisLabelFontSize(
int );
845 virtual void SetAxisLabelJustification(
int );
846 virtual void SetAxisLabelVerticalJustification(
int );
868 double XComputedRange[2];
869 double YComputedRange[2];
881 double TitlePosition[2];
894 double ViewportCoordinate[2];
895 double PlotCoordinate[2];
913 void InitializeEntries();
918 double LegendPosition[2];
919 double LegendPosition2[2];
949 void ComputeXRange(
double range[2],
double *lengths);
950 void ComputeYRange(
double range[2]);
951 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
953 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
954 double yRange[2],
double *norms,
955 int numDS,
int numDO);
956 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
957 void GenerateClipPlanes(
int *pos,
int *pos2);
958 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
959 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
960 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
975 const char* arrayName,