VTK  9.3.20240304
vtkXYPlotActor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
98 #ifndef vtkXYPlotActor_h
99 #define vtkXYPlotActor_h
100 
101 #define VTK_XYPLOT_INDEX 0
102 #define VTK_XYPLOT_ARC_LENGTH 1
103 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
104 #define VTK_XYPLOT_VALUE 3
105 
106 #define VTK_XYPLOT_ROW 0
107 #define VTK_XYPLOT_COLUMN 1
108 
109 #define VTK_XYPLOT_Y_AXIS_TOP 0
110 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
111 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
112 
113 #include "vtkActor2D.h"
114 #include "vtkRenderingAnnotationModule.h" // For export macro
115 #include "vtkSmartPointer.h" // For SP
116 
117 VTK_ABI_NAMESPACE_BEGIN
118 class vtkXYPlotActorConnections;
119 class vtkAlgorithmOutput;
120 class vtkAppendPolyData;
121 class vtkAxisActor2D;
122 class vtkDataObject;
124 class vtkDataSet;
126 class vtkDoubleArray;
127 class vtkGlyph2D;
128 class vtkGlyphSource2D;
129 class vtkIntArray;
130 class vtkLegendBoxActor;
131 class vtkPlanes;
132 class vtkPolyData;
133 class vtkPolyDataMapper2D;
134 class vtkTextActor;
135 class vtkTextMapper;
136 class vtkTextProperty;
137 
138 class VTKRENDERINGANNOTATION_EXPORT vtkXYPlotActor : public vtkActor2D
139 {
140 public:
141  vtkTypeMacro(vtkXYPlotActor, vtkActor2D);
142  void PrintSelf(ostream& os, vtkIndent indent) override;
143 
150  static vtkXYPlotActor* New();
151 
152  //---Data Set Input----------------------------------------------------------
153  // The following methods are used to plot input datasets. Datasets
154  // will be plotted if set as input; otherwise the input data objects
155  // will be plotted (if defined).
156 
158 
166  void AddDataSetInput(vtkDataSet* ds, const char* arrayName, int component);
167  void AddDataSetInput(vtkDataSet* ds) { this->AddDataSetInput(ds, nullptr, 0); }
168  void AddDataSetInputConnection(vtkAlgorithmOutput* in, const char* arrayName, int component);
170  {
171  this->AddDataSetInputConnection(in, nullptr, 0);
172  }
174 
176 
179  void RemoveDataSetInput(vtkDataSet* ds, const char* arrayName, int component);
180  void RemoveDataSetInput(vtkDataSet* ds) { this->RemoveDataSetInput(ds, nullptr, 0); }
181  void RemoveDataSetInputConnection(vtkAlgorithmOutput* in, const char* arrayName, int component);
183  {
184  this->RemoveDataSetInputConnection(in, nullptr, 0);
185  }
187 
193 
195 
199  void SetPointComponent(int i, int comp);
200  int GetPointComponent(int i);
201  //---end Data Set Input-----------------------------------------------------
203 
205 
215  vtkSetClampMacro(XValues, int, VTK_XYPLOT_INDEX, VTK_XYPLOT_VALUE);
216  vtkGetMacro(XValues, int);
217  void SetXValuesToIndex() { this->SetXValues(VTK_XYPLOT_INDEX); }
218  void SetXValuesToArcLength() { this->SetXValues(VTK_XYPLOT_ARC_LENGTH); }
220  void SetXValuesToValue() { this->SetXValues(VTK_XYPLOT_VALUE); }
221  const char* GetXValuesAsString();
223 
224  //---Data Object Input------------------------------------------------------
225  // The following methods are used to plot input data objects. Datasets will
226  // be plotted in preference to data objects if set as input; otherwise the
227  // input data objects will be plotted (if defined).
228 
230 
236 
238 
244 
246 
251  vtkSetClampMacro(DataObjectPlotMode, int, VTK_XYPLOT_ROW, VTK_XYPLOT_COLUMN);
252  vtkGetMacro(DataObjectPlotMode, int);
253  void SetDataObjectPlotModeToRows() { this->SetDataObjectPlotMode(VTK_XYPLOT_ROW); }
254  void SetDataObjectPlotModeToColumns() { this->SetDataObjectPlotMode(VTK_XYPLOT_COLUMN); }
257 
259 
267  void SetDataObjectXComponent(int i, int comp);
270 
272 
280  void SetDataObjectYComponent(int i, int comp);
282  //---end Data Object Input--------------------------------------------------
284 
285  //---Per Curve Properties---------------------------------------------------
286  // The following methods are used to set properties on each curve that is
287  // plotted. Each input dataset (or data object) results in one curve. The
288  // methods that follow have an index i that corresponds to the input dataset
289  // or data object.
290  void SetPlotColor(int i, double r, double g, double b);
291  void SetPlotColor(int i, const double color[3])
292  {
293  this->SetPlotColor(i, color[0], color[1], color[2]);
294  }
295  double* GetPlotColor(int i) VTK_SIZEHINT(3);
296  void SetPlotSymbol(int i, vtkPolyData* input);
298  void SetPlotLabel(int i, const char* label);
299  const char* GetPlotLabel(int i);
300 
301  // Allow per-curve specification of line and point rendering. These override
302  // global settings PlotPoints and PlotLines. If not on, the default behavior
303  // is governed by PlotPoints and PlotLines ivars.
304  vtkGetMacro(PlotCurvePoints, vtkTypeBool);
305  vtkSetMacro(PlotCurvePoints, vtkTypeBool);
306  vtkBooleanMacro(PlotCurvePoints, vtkTypeBool);
307 
308  vtkGetMacro(PlotCurveLines, vtkTypeBool);
309  vtkSetMacro(PlotCurveLines, vtkTypeBool);
310  vtkBooleanMacro(PlotCurveLines, vtkTypeBool);
311 
312  void SetPlotLines(int i, int);
313  int GetPlotLines(int i);
314 
315  void SetPlotPoints(int i, int);
316  int GetPlotPoints(int i);
317  //---end Per Curve Properties-----------------------------------------------
318 
320 
324  vtkSetMacro(ExchangeAxes, vtkTypeBool);
325  vtkGetMacro(ExchangeAxes, vtkTypeBool);
326  vtkBooleanMacro(ExchangeAxes, vtkTypeBool);
328 
330 
335  vtkSetMacro(ReverseXAxis, vtkTypeBool);
336  vtkGetMacro(ReverseXAxis, vtkTypeBool);
337  vtkBooleanMacro(ReverseXAxis, vtkTypeBool);
339 
341 
346  vtkSetMacro(ReverseYAxis, vtkTypeBool);
347  vtkGetMacro(ReverseYAxis, vtkTypeBool);
348  vtkBooleanMacro(ReverseYAxis, vtkTypeBool);
350 
352 
358  vtkGetObjectMacro(LegendActor, vtkLegendBoxActor);
359  vtkGetObjectMacro(GlyphSource, vtkGlyphSource2D);
361 
363 
366  vtkSetStringMacro(Title);
367  vtkGetStringMacro(Title);
369 
371 
374  vtkSetStringMacro(XTitle);
375  vtkGetStringMacro(XTitle);
377 
379 
382  virtual void SetYTitle(const char*);
383  char* GetYTitle();
385 
387 
391  vtkAxisActor2D* GetXAxisActor2D() { return this->XAxis; }
392  vtkAxisActor2D* GetYAxisActor2D() { return this->YAxis; }
394 
396 
404  vtkSetVector2Macro(XRange, double);
405  vtkGetVectorMacro(XRange, double, 2);
406  vtkSetVector2Macro(YRange, double);
407  vtkGetVectorMacro(YRange, double, 2);
408  void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
409  {
410  this->SetXRange(xmin, xmax);
411  this->SetYRange(ymin, ymax);
412  }
414 
416 
422  vtkSetClampMacro(NumberOfXLabels, int, 0, 50);
423  vtkGetMacro(NumberOfXLabels, int);
424  vtkSetClampMacro(NumberOfYLabels, int, 0, 50);
425  vtkGetMacro(NumberOfYLabels, int);
426  void SetNumberOfLabels(int num)
427  {
428  this->SetNumberOfXLabels(num);
429  this->SetNumberOfYLabels(num);
430  }
432 
434 
441  void SetAdjustXLabels(int adjust);
442  vtkGetMacro(AdjustXLabels, int);
443  void SetAdjustYLabels(int adjust);
444  vtkGetMacro(AdjustYLabels, int);
446 
448 
451  void SetNumberOfXMinorTicks(int num);
453  void SetNumberOfYMinorTicks(int num);
456 
458 
463  vtkSetMacro(Legend, vtkTypeBool);
464  vtkGetMacro(Legend, vtkTypeBool);
465  vtkBooleanMacro(Legend, vtkTypeBool);
467 
469 
473  vtkSetVector2Macro(TitlePosition, double);
474  vtkGetVector2Macro(TitlePosition, double);
476 
478 
482  vtkSetMacro(AdjustTitlePosition, vtkTypeBool);
483  vtkGetMacro(AdjustTitlePosition, vtkTypeBool);
484  vtkBooleanMacro(AdjustTitlePosition, vtkTypeBool);
486 
488  {
489  AlignLeft = 0x1,
490  AlignRight = 0x2,
491  AlignHCenter = 0x4,
492  AlignTop = 0x10,
493  AlignBottom = 0x20,
494  AlignVCenter = 0x40,
495  AlignAxisLeft = 0x100,
496  AlignAxisRight = 0x200,
497  AlignAxisHCenter = 0x400,
498  AlignAxisTop = 0x1000,
499  AlignAxisBottom = 0x2000,
500  AlignAxisVCenter = 0x4000
501  };
502 
504 
511  vtkSetMacro(AdjustTitlePositionMode, int);
512  vtkGetMacro(AdjustTitlePositionMode, int);
514 
516 
524  vtkSetVector2Macro(LegendPosition, double);
525  vtkGetVector2Macro(LegendPosition, double);
526  vtkSetVector2Macro(LegendPosition2, double);
527  vtkGetVector2Macro(LegendPosition2, double);
529 
531 
535  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
537 
539 
544  vtkGetObjectMacro(AxisTitleTextProperty, vtkTextProperty);
546 
548 
553  vtkGetObjectMacro(AxisLabelTextProperty, vtkTextProperty);
555 
557 
560  vtkSetMacro(Logx, vtkTypeBool);
561  vtkGetMacro(Logx, vtkTypeBool);
562  vtkBooleanMacro(Logx, vtkTypeBool);
564 
566 
570  virtual void SetLabelFormat(const char*);
571  const char* GetLabelFormat() { return this->GetXLabelFormat(); }
573 
575 
578  virtual void SetXLabelFormat(const char*);
579  vtkGetStringMacro(XLabelFormat);
581 
583 
586  virtual void SetYLabelFormat(const char*);
587  vtkGetStringMacro(YLabelFormat);
589 
591 
595  vtkSetClampMacro(Border, int, 0, 50);
596  vtkGetMacro(Border, int);
598 
600 
605  vtkGetMacro(PlotPoints, vtkTypeBool);
606  vtkSetMacro(PlotPoints, vtkTypeBool);
607  vtkBooleanMacro(PlotPoints, vtkTypeBool);
609 
611 
615  vtkGetMacro(PlotLines, vtkTypeBool);
616  vtkSetMacro(PlotLines, vtkTypeBool);
617  vtkBooleanMacro(PlotLines, vtkTypeBool);
619 
621 
626  vtkSetClampMacro(GlyphSize, double, 0.0, 0.2);
627  vtkGetMacro(GlyphSize, double);
629 
634  void ViewportToPlotCoordinate(vtkViewport* viewport, double& u, double& v);
635 
637 
643  vtkSetVector2Macro(PlotCoordinate, double);
644  vtkGetVector2Macro(PlotCoordinate, double);
646 
650  void PlotToViewportCoordinate(vtkViewport* viewport, double& u, double& v);
651 
653 
660  vtkSetVector2Macro(ViewportCoordinate, double);
661  vtkGetVector2Macro(ViewportCoordinate, double);
663 
668  int IsInPlot(vtkViewport* viewport, double u, double v);
669 
671 
675  vtkSetMacro(ChartBox, vtkTypeBool);
676  vtkGetMacro(ChartBox, vtkTypeBool);
677  vtkBooleanMacro(ChartBox, vtkTypeBool);
679 
681 
685  vtkSetMacro(ChartBorder, vtkTypeBool);
686  vtkGetMacro(ChartBorder, vtkTypeBool);
687  vtkBooleanMacro(ChartBorder, vtkTypeBool);
689 
693  vtkProperty2D* GetChartBoxProperty() { return this->ChartBoxActor->GetProperty(); }
694 
696 
699  vtkSetMacro(ShowReferenceXLine, vtkTypeBool);
700  vtkGetMacro(ShowReferenceXLine, vtkTypeBool);
701  vtkBooleanMacro(ShowReferenceXLine, vtkTypeBool);
703 
705 
708  vtkSetMacro(ReferenceXValue, double);
709  vtkGetMacro(ReferenceXValue, double);
711 
713 
716  vtkSetMacro(ShowReferenceYLine, vtkTypeBool);
717  vtkGetMacro(ShowReferenceYLine, vtkTypeBool);
718  vtkBooleanMacro(ShowReferenceYLine, vtkTypeBool);
720 
722 
725  vtkSetMacro(ReferenceYValue, double);
726  vtkGetMacro(ReferenceYValue, double);
728 
732  vtkMTimeType GetMTime() override;
733 
737  void PrintAsCSV(ostream& os);
738 
740 
746  int RenderOverlay(vtkViewport*) override;
747  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
749 
754 
761 
763 
769 
771 
774  vtkSetMacro(YTitlePosition, int);
775  vtkGetMacro(YTitlePosition, int);
776  void SetYTitlePositionToTop() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_TOP); }
777  void SetYTitlePositionToHCenter() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_HCENTER); }
778  void SetYTitlePositionToVCenter() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_VCENTER); }
780 
782 
785  virtual void SetPlotGlyphType(int, int);
786  virtual void SetLineWidth(double);
787  virtual void AddUserCurvesPoint(double, double, double);
788  virtual void RemoveAllActiveCurves();
790 
792 
795  virtual void SetLegendBorder(int);
796  virtual void SetLegendBox(int);
797  virtual void SetLegendUseBackground(int);
798  virtual void SetLegendBackgroundColor(double, double, double);
800 
802 
805  virtual void SetTitleColor(double, double, double);
806  virtual void SetTitleFontFamily(int);
807  virtual void SetTitleBold(int);
808  virtual void SetTitleItalic(int);
809  virtual void SetTitleShadow(int);
810  virtual void SetTitleFontSize(int);
811  virtual void SetTitleJustification(int);
812  virtual void SetTitleVerticalJustification(int);
814 
816 
819  virtual void SetXAxisColor(double, double, double);
820  virtual void SetYAxisColor(double, double, double);
822 
824 
827  virtual void SetAxisTitleColor(double, double, double);
828  virtual void SetAxisTitleFontFamily(int);
829  virtual void SetAxisTitleBold(int);
830  virtual void SetAxisTitleItalic(int);
831  virtual void SetAxisTitleShadow(int);
832  virtual void SetAxisTitleFontSize(int);
833  virtual void SetAxisTitleJustification(int);
836 
838 
841  virtual void SetAxisLabelColor(double, double, double);
842  virtual void SetAxisLabelFontFamily(int);
843  virtual void SetAxisLabelBold(int);
844  virtual void SetAxisLabelItalic(int);
845  virtual void SetAxisLabelShadow(int);
846  virtual void SetAxisLabelFontSize(int);
847  virtual void SetAxisLabelJustification(int);
850 
851 protected:
853  ~vtkXYPlotActor() override;
854 
855  vtkXYPlotActorConnections* InputConnectionHolder;
856  char** SelectedInputScalars; // list of data set arrays to plot
858  vtkXYPlotActorConnections* DataObjectInputConnectionHolder; // list of data objects to plot
859  char* Title;
860  char* XTitle;
862  int XValues;
868  double XRange[2];
869  double YRange[2];
870  double XComputedRange[2]; // range actually used by plot
871  double YComputedRange[2]; // range actually used by plot
872  int Border;
883  double TitlePosition[2];
885 
889 
892 
895 
896  double ViewportCoordinate[2];
897  double PlotCoordinate[2];
898 
899  // Handle data objects and datasets
905 
906  // The data drawn within the axes. Each curve is one polydata.
907  // color is controlled by scalar data. The curves are appended
908  // together, possibly glyphed with point symbols.
916 
917  // Legends and plot symbols. The legend also keeps track of
918  // the symbols and such.
920  double LegendPosition[2];
921  double LegendPosition2[2];
925  double GlyphSize;
926 
927  // Background box
936 
937  // Reference lines
942 
946 
947  // Keep track of changes.
948  int CachedSize[2];
950 
951  void ComputeXRange(double range[2], double* lengths);
952  void ComputeYRange(double range[2]);
953  void ComputeDORange(double xrange[2], double yrange[2], double* lengths);
954 
955  virtual void CreatePlotData(
956  int* pos, int* pos2, double xRange[2], double yRange[2], double* norms, int numDS, int numDO);
957  void PlaceAxes(vtkViewport* viewport, const int* size, int pos[2], int pos2[2]);
958  void GenerateClipPlanes(int* pos, int* pos2);
959  double ComputeGlyphScale(int i, int* pos, int* pos2);
960  void ClipPlotData(int* pos, int* pos2, vtkPolyData* pd);
961  double* TransformPoint(int pos[2], int pos2[2], double x[3], double xNew[3]);
962 
964 
968 
969 private:
970  vtkXYPlotActor(const vtkXYPlotActor&) = delete;
971  void operator=(const vtkXYPlotActor&) = delete;
972 
973  bool DoesConnectionMatch(int i, vtkAlgorithmOutput* in);
974 
975  int IsInputPresent(vtkAlgorithmOutput* in, const char* arrayName, int component);
976 
980  int YTitleSize[2];
981 
985  int YTitlePosition;
986 
988 
991  int YTitleDelta;
993 };
994 
995 VTK_ABI_NAMESPACE_END
996 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:144
Proxy object to connect input/output ports.
appends one or more polygonal datasets together
Create an axis with tick marks and labels.
maintain an unordered list of data objects
general representation of visualization data
maintain an unordered list of dataset objects
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
dynamic, self-adjusting array of double
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:61
create 2D glyphs represented by vtkPolyData
a simple class to control print indentation
Definition: vtkIndent.h:108
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:144
draw symbols with text
implicit function for convex set of planes
Definition: vtkPlanes.h:151
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:180
represent surface properties of a 2D image
An actor that displays text.
Definition: vtkTextActor.h:155
2D text annotation
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:44
abstract specification for Viewports
Definition: vtkViewport.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
generate an x-y plot from input dataset(s) or field data
void RemoveAllDataSetInputConnections()
This removes all of the data set inputs, but does not change the data object inputs.
void AddDataSetInputConnection(vtkAlgorithmOutput *in, const char *arrayName, int component)
Add a dataset to the list of data to append.
void SetXValuesToIndex()
Specify how the independent (x) variable is computed from the points.
int IsInPlot(vtkViewport *viewport, double u, double v)
Is the specified viewport position within the plot area (as opposed to the region used by the plot pl...
virtual void SetTitleVerticalJustification(int)
Set title properties.
int GetDataObjectXComponent(int i)
Specify which component of the input data object to use as the independent variable for the ith input...
void SetNumberOfLabels(int num)
Set/Get the number of annotation labels to show along the x and y axes.
virtual void SetLegendBox(int)
Set legend properties.
void SetPlotPoints(int i, int)
void SetAdjustYLabels(int adjust)
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
void ComputeXRange(double range[2], double *lengths)
virtual void SetTitleFontSize(int)
Set title properties.
int RenderOverlay(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void SetXValuesToNormalizedArcLength()
Specify how the independent (x) variable is computed from the points.
vtkGlyph2D ** PlotGlyph
const char * GetPlotLabel(int i)
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
vtkTextActor * YTitleActor
vtkAxisActor2D * YAxis
vtkPolyData * ReferenceLinesPolyData
virtual void SetTitleFontFamily(int)
Set title properties.
virtual void SetAxisLabelItalic(int)
Set axis label properties.
vtkGlyphSource2D * GlyphSource
int GetPlotLines(int i)
const char * GetDataObjectPlotModeAsString()
Indicate whether to plot rows or columns.
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property.
virtual void SetAxisTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property of all axes.
void AddDataSetInput(vtkDataSet *ds, const char *arrayName, int component)
Add a dataset to the list of data to append.
void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
Set the plot range (range of independent and dependent variables) to plot.
vtkTypeBool ExchangeAxes
void PlotToViewportCoordinate(vtkViewport *viewport)
An alternate form of PlotToViewportCoordinate() above.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetTitleBold(int)
Set title properties.
vtkTypeBool ShowReferenceYLine
vtkTypeBool Logx
virtual void SetAxisTitleItalic(int)
Set axis title properties.
double * TransformPoint(int pos[2], int pos2[2], double x[3], double xNew[3])
virtual void SetYTitle(const char *)
Set/Get the title of the y axis.
virtual void SetAxisLabelShadow(int)
Set axis label properties.
virtual void SetYLabelFormat(const char *)
Set/Get the format with which to print the Y label.
vtkAxisActor2D * GetYAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example)
vtkPolyData ** PlotData
vtkTypeBool PlotLines
void SetXValuesToValue()
Specify how the independent (x) variable is computed from the points.
vtkXYPlotActorConnections * InputConnectionHolder
vtkIntArray * XComponent
vtkActor2D * ReferenceLinesActor
virtual void CreatePlotData(int *pos, int *pos2, double xRange[2], double yRange[2], double *norms, int numDS, int numDO)
virtual void SetLegendUseBackground(int)
Set legend properties.
void SetPointComponent(int i, int comp)
If plotting points by value, which component to use to determine the value.
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
vtkPlanes * ClipPlanes
vtkAxisActor2D * GetXAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example)
vtkTextProperty * AxisLabelTextProperty
const char * GetXValuesAsString()
Specify how the independent (x) variable is computed from the points.
double ReferenceYValue
void SetPlotColor(int i, double r, double g, double b)
void SetYTitlePositionToVCenter()
Set/Get the position of the title of Y axis.
vtkPolyDataMapper2D * ReferenceLinesMapper
vtkActor2D * ChartBoxActor
vtkTypeBool ChartBox
void SetYTitlePositionToHCenter()
Set/Get the position of the title of Y axis.
virtual void RemoveAllActiveCurves()
Set plot properties.
vtkMTimeType GetMTime() override
Take into account the modified time of internal helper classes.
void PrintAsCSV(ostream &os)
Write the XY Ploat Actor as a CSV (comma separated value) representation.
void SetPlotSymbol(int i, vtkPolyData *input)
void SetDataObjectPlotModeToColumns()
Indicate whether to plot rows or columns.
void ComputeYRange(double range[2])
void SetDataObjectYComponent(int i, int comp)
Specify which component of the input data object to use as the dependent variable for the ith input d...
virtual void SetAxisTitleVerticalJustification(int)
Set axis title properties.
void SetNumberOfXMinorTicks(int num)
Set/Get the number of minor ticks in X or Y.
void AddDataSetInput(vtkDataSet *ds)
Add a dataset to the list of data to append.
vtkIntArray * PointsOn
virtual void SetLegendBorder(int)
Set legend properties.
virtual void SetYAxisColor(double, double, double)
Set axes properties.
double ComputeGlyphScale(int i, int *pos, int *pos2)
void SetXTitlePosition(double position)
Set/Get the position of the title of X axis.
vtkPolyData * GetPlotSymbol(int i)
static vtkXYPlotActor * New()
Instantiate object with autorange computation; bold, italic, and shadows on; arial font family; the n...
virtual void SetAxisTitleFontFamily(int)
Set axis title properties.
virtual void SetPlotGlyphType(int, int)
Set plot properties.
void AddDataObjectInputConnection(vtkAlgorithmOutput *alg)
Add a data object to the list of data to display.
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in, const char *arrayName, int component)
Remove a dataset from the list of data to append.
virtual void SetAxisLabelVerticalJustification(int)
Set axis label properties.
virtual void SetAxisTitleShadow(int)
Set axis title properties.
virtual void SetAxisLabelColor(double, double, double)
Set axis label properties.
vtkTextProperty * TitleTextProperty
void RemoveDataObjectInput(vtkDataObject *in)
Remove a dataset from the list of data to display.
virtual void SetTitleItalic(int)
Set title properties.
double * GetPlotColor(int i)
virtual void AddUserCurvesPoint(double, double, double)
Set plot properties.
virtual void SetAxisTitleJustification(int)
Set axis title properties.
int GetPlotPoints(int i)
vtkTypeBool ReverseYAxis
void SetPlotLabel(int i, const char *label)
void PlaceAxes(vtkViewport *viewport, const int *size, int pos[2], int pos2[2])
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in)
Remove a dataset from the list of data to append.
char ** SelectedInputScalars
virtual void SetAxisLabelBold(int)
Set axis label properties.
virtual void SetAxisTitleFontSize(int)
Set axis title properties.
virtual void SetAxisTitleBold(int)
Set axis title properties.
virtual void SetXLabelFormat(const char *)
Set/Get the format with which to print the X label.
vtkActor2D ** PlotActor
virtual void SetXAxisColor(double, double, double)
Set axes properties.
void AddDataObjectInput(vtkDataObject *in)
Add a data object to the list of data to display.
vtkActor2D * TitleActor
void ViewportToPlotCoordinate(vtkViewport *viewport, double &u, double &v)
Given a position within the viewport used by the plot, return the the plot coordinates (XAxis value,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetLineWidth(double)
Set plot properties.
void ClipPlotData(int *pos, int *pos2, vtkPolyData *pd)
vtkTypeBool AdjustTitlePosition
vtkIntArray * YComponent
void SetPlotLines(int i, int)
vtkTypeBool PlotPoints
vtkTypeBool PlotCurvePoints
void GenerateClipPlanes(int *pos, int *pos2)
~vtkXYPlotActor() override
int GetNumberOfYMinorTicks()
Set/Get the number of minor ticks in X or Y.
virtual void SetAxisLabelJustification(int)
Set axis label properties.
const char * GetLabelFormat()
Set/Get the format with which to print the labels .
vtkTextMapper * TitleMapper
vtkPolyData * ChartBorderPolyData
virtual void SetTitleJustification(int)
Set title properties.
void RemoveDataObjectInputConnection(vtkAlgorithmOutput *aout)
Remove a dataset from the list of data to display.
vtkTypeBool PlotCurveLines
char * GetYTitle()
Set/Get the title of the y axis.
vtkIntArray * SelectedInputScalarsComponent
vtkActor2D * ChartBorderActor
virtual void SetLegendBackgroundColor(double, double, double)
Set legend properties.
virtual void SetAxisLabelFontSize(int)
Set axis label properties.
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetLabelFormat(const char *)
Set/Get the format with which to print the labels .
void RemoveDataSetInput(vtkDataSet *ds, const char *arrayName, int component)
Remove a dataset from the list of data to append.
void SetYTitlePositionToTop()
Set/Get the position of the title of Y axis.
void SetPlotColor(int i, const double color[3])
vtkPolyDataMapper2D * ChartBoxMapper
int GetPointComponent(int i)
If plotting points by value, which component to use to determine the value.
virtual void SetTitleColor(double, double, double)
Set title properties.
int GetNumberOfXMinorTicks()
Set/Get the number of minor ticks in X or Y.
vtkAxisActor2D * XAxis
virtual void SetAxisTitleColor(double, double, double)
Set axis title properties.
vtkTypeBool ChartBorder
void PlotToViewportCoordinate(vtkViewport *viewport, double &u, double &v)
Given a plot coordinate, return the viewpoint position.
virtual void SetTitleShadow(int)
Set title properties.
vtkTypeBool ShowReferenceXLine
void SetDataObjectXComponent(int i, int comp)
Specify which component of the input data object to use as the independent variable for the ith input...
vtkLegendBoxActor * LegendActor
void InitializeEntries()
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
double GetXTitlePosition()
Set/Get the position of the title of X axis.
vtkPolyDataMapper2D * ChartBorderMapper
vtkTypeBool ReverseXAxis
vtkPolyData * ChartBoxPolyData
vtkIntArray * LinesOn
vtkTypeBool Legend
vtkPolyDataMapper2D ** PlotMapper
vtkTimeStamp BuildTime
void RemoveDataSetInput(vtkDataSet *ds)
Remove a dataset from the list of data to append.
void SetXValuesToArcLength()
Specify how the independent (x) variable is computed from the points.
int GetDataObjectYComponent(int i)
Specify which component of the input data object to use as the dependent variable for the ith input d...
void SetDataObjectPlotModeToRows()
Indicate whether to plot rows or columns.
void SetNumberOfYMinorTicks(int num)
Set/Get the number of minor ticks in X or Y.
vtkSmartPointer< vtkDoubleArray > ActiveCurve
vtkTextProperty * AxisTitleTextProperty
vtkAppendPolyData ** PlotAppend
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
Add a dataset to the list of data to append.
void ViewportToPlotCoordinate(vtkViewport *viewport)
An alternate form of ViewportToPlotCoordinate() above.
void SetAdjustXLabels(int adjust)
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
virtual void SetAxisLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property of all axes.
double ReferenceXValue
virtual void SetAxisLabelFontFamily(int)
Set axis label properties.
void ComputeDORange(double xrange[2], double yrange[2], double *lengths)
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
@ component
Definition: vtkX3D.h:175
@ range
Definition: vtkX3D.h:238
@ color
Definition: vtkX3D.h:221
@ position
Definition: vtkX3D.h:261
@ size
Definition: vtkX3D.h:253
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_SIZEHINT(...)
#define VTK_XYPLOT_Y_AXIS_HCENTER
#define VTK_XYPLOT_Y_AXIS_VCENTER
#define VTK_XYPLOT_COLUMN
#define VTK_XYPLOT_INDEX
#define VTK_XYPLOT_Y_AXIS_TOP
#define VTK_XYPLOT_VALUE
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
#define VTK_XYPLOT_ROW
#define VTK_XYPLOT_ARC_LENGTH