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, NULL, 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);
281 this->SetPlotColor(i, color[0], color[1], color[2]); };
282 double *GetPlotColor(
int i);
285 void SetPlotLabel(
int i,
const char *label);
286 const char *GetPlotLabel(
int i);
291 vtkGetMacro(PlotCurvePoints,
int);
295 vtkGetMacro(PlotCurveLines,
int);
299 void SetPlotLines(
int i,
int);
300 int GetPlotLines(
int i);
302 void SetPlotPoints(
int i,
int);
303 int GetPlotPoints(
int i);
312 vtkGetMacro(ExchangeAxes,
int);
323 vtkGetMacro(ReverseXAxis,
int);
334 vtkGetMacro(ReverseYAxis,
int);
353 vtkSetStringMacro(Title);
361 vtkSetStringMacro(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();
451 vtkGetMacro(Legend,
int);
460 vtkSetVector2Macro(TitlePosition,
double);
461 vtkGetVector2Macro(TitlePosition,
double);
470 vtkGetMacro(AdjustTitlePosition,
int);
481 AlignAxisLeft = 0x100,
482 AlignAxisRight = 0x200,
483 AlignAxisHCenter = 0x400,
484 AlignAxisTop = 0x1000,
485 AlignAxisBottom = 0x2000,
486 AlignAxisVCenter = 0x4000
498 vtkGetMacro(AdjustTitlePositionMode,
int);
510 vtkSetVector2Macro(LegendPosition,
double);
511 vtkGetVector2Macro(LegendPosition,
double);
512 vtkSetVector2Macro(LegendPosition2,
double);
513 vtkGetVector2Macro(LegendPosition2,
double);
547 vtkGetMacro(Logx,
int);
556 virtual void SetLabelFormat (
const char* );
559 return this->GetXLabelFormat();
567 virtual void SetXLabelFormat (
const char* );
575 virtual void SetYLabelFormat (
const char* );
584 vtkSetClampMacro(Border,
int, 0, 50);
585 vtkGetMacro(Border,
int);
594 vtkGetMacro(PlotPoints,
int);
604 vtkGetMacro(PlotLines,
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);
665 vtkGetMacro(ChartBox,
int);
675 vtkGetMacro(ChartBorder,
int);
689 vtkGetMacro(ShowReferenceXLine,
int);
698 vtkGetMacro(ReferenceXValue,
double);
706 vtkGetMacro(ShowReferenceYLine,
int);
715 vtkGetMacro(ReferenceYValue,
double);
726 void PrintAsCSV(ostream &os);
734 int RenderOpaqueGeometry(
vtkViewport*) VTK_OVERRIDE;
736 int RenderTranslucentPolygonalGeometry(
vtkViewport *) VTK_OVERRIDE {
return 0;}
749 void ReleaseGraphicsResources(
vtkWindow *) VTK_OVERRIDE;
755 void SetXTitlePosition(
double position);
756 double GetXTitlePosition();
764 vtkGetMacro(YTitlePosition,
int);
765 void SetYTitlePositionToTop()
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 );
853 vtkXYPlotActorConnections* InputConnectionHolder;
854 char** SelectedInputScalars;
856 vtkXYPlotActorConnections *DataObjectInputConnectionHolder;
868 double XComputedRange[2];
869 double YComputedRange[2];
880 int AdjustTitlePosition;
881 double TitlePosition[2];
882 int AdjustTitlePositionMode;
894 double ViewportCoordinate[2];
895 double PlotCoordinate[2];
898 int DataObjectPlotMode;
913 void InitializeEntries();
918 double LegendPosition[2];
919 double LegendPosition2[2];
936 int ShowReferenceXLine;
937 int ShowReferenceYLine;
938 double ReferenceXValue;
939 double ReferenceYValue;
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]);
965 int ActiveCurveIndex;
975 const
char* arrayName,
const char * GetLabelFormat()
Set/Get the format with which to print the labels .
generate an x-y plot from input dataset(s) or field data
maintain an unordered list of dataset objects
copy oriented and scaled glyph geometry to every input point (2D specialization)
vtkTypeUInt32 vtkMTimeType
abstract specification for Viewports
abstract class to specify dataset behavior
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
Add a dataset to the list of data to append.
vtkMTimeType GetMTime() override
Return this objects MTime.
maintain an unordered list of data objects
a actor that draws 2D data
vtkAxisActor2D * GetXAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example) ...
record modification and/or execution time
#define VTK_XYPLOT_Y_AXIS_TOP
implicit function for convex set of planes
Create an axis with tick marks and labels.
void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
Set the plot range (range of independent and dependent variables) to plot.
Hold a reference to a vtkObjectBase instance.
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
#define VTK_XYPLOT_Y_AXIS_HCENTER
window superclass for vtkRenderWindow
vtkAxisActor2D * GetYAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example) ...
An actor that displays text.
#define VTK_XYPLOT_ARC_LENGTH
dynamic, self-adjusting array of int
a simple class to control print indentation
int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
void SetPlotColor(int i, const double color[3])
appends one or more polygonal datasets together
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
represent text properties.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void AddDataSetInput(vtkDataSet *ds)
Add a dataset to the list of data to append.
void SetNumberOfLabels(int num)
Set/Get the number of annotation labels to show along the x and y axes.
void SetXValuesToArcLength()
Specify how the independent (x) variable is computed from the points.
void SetXValuesToValue()
Specify how the independent (x) variable is computed from the points.
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
void SetYTitlePositionToVCenter()
Set/Get the position of the title of Y axis.
#define VTK_XYPLOT_COLUMN
void SetXValuesToNormalizedArcLength()
Specify how the independent (x) variable is computed from the points.
void SetDataObjectPlotModeToRows()
Indicate whether to plot rows or columns.
void SetYTitlePositionToHCenter()
Set/Get the position of the title of Y axis.
represent surface properties of a 2D image
create 2D glyphs represented by vtkPolyData
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetXValuesToIndex()
Specify how the independent (x) variable is computed from the points.
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in)
Remove a dataset from the list of data to append.
general representation of visualization data
void RemoveDataSetInput(vtkDataSet *ds)
Remove a dataset from the list of data to append.
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDataObjectPlotModeToColumns()
Indicate whether to plot rows or columns.
#define VTK_XYPLOT_Y_AXIS_VCENTER