VTK  9.2.20230527
vtkXYPlotActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYPlotActor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
110 #ifndef vtkXYPlotActor_h
111 #define vtkXYPlotActor_h
112 
113 #define VTK_XYPLOT_INDEX 0
114 #define VTK_XYPLOT_ARC_LENGTH 1
115 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
116 #define VTK_XYPLOT_VALUE 3
117 
118 #define VTK_XYPLOT_ROW 0
119 #define VTK_XYPLOT_COLUMN 1
120 
121 #define VTK_XYPLOT_Y_AXIS_TOP 0
122 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
123 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
124 
125 #include "vtkActor2D.h"
126 #include "vtkRenderingAnnotationModule.h" // For export macro
127 #include "vtkSmartPointer.h" // For SP
128 
129 VTK_ABI_NAMESPACE_BEGIN
130 class vtkXYPlotActorConnections;
131 class vtkAlgorithmOutput;
132 class vtkAppendPolyData;
133 class vtkAxisActor2D;
134 class vtkDataObject;
136 class vtkDataSet;
138 class vtkDoubleArray;
139 class vtkGlyph2D;
140 class vtkGlyphSource2D;
141 class vtkIntArray;
142 class vtkLegendBoxActor;
143 class vtkPlanes;
144 class vtkPolyData;
145 class vtkPolyDataMapper2D;
146 class vtkTextActor;
147 class vtkTextMapper;
148 class vtkTextProperty;
149 
150 class VTKRENDERINGANNOTATION_EXPORT vtkXYPlotActor : public vtkActor2D
151 {
152 public:
153  vtkTypeMacro(vtkXYPlotActor, vtkActor2D);
154  void PrintSelf(ostream& os, vtkIndent indent) override;
155 
162  static vtkXYPlotActor* New();
163 
164  //---Data Set Input----------------------------------------------------------
165  // The following methods are used to plot input datasets. Datasets
166  // will be plotted if set as input; otherwise the input data objects
167  // will be plotted (if defined).
168 
170 
178  void AddDataSetInput(vtkDataSet* ds, const char* arrayName, int component);
179  void AddDataSetInput(vtkDataSet* ds) { this->AddDataSetInput(ds, nullptr, 0); }
180  void AddDataSetInputConnection(vtkAlgorithmOutput* in, const char* arrayName, int component);
182  {
183  this->AddDataSetInputConnection(in, nullptr, 0);
184  }
186 
188 
191  void RemoveDataSetInput(vtkDataSet* ds, const char* arrayName, int component);
192  void RemoveDataSetInput(vtkDataSet* ds) { this->RemoveDataSetInput(ds, nullptr, 0); }
193  void RemoveDataSetInputConnection(vtkAlgorithmOutput* in, const char* arrayName, int component);
195  {
196  this->RemoveDataSetInputConnection(in, nullptr, 0);
197  }
199 
205 
207 
211  void SetPointComponent(int i, int comp);
212  int GetPointComponent(int i);
213  //---end Data Set Input-----------------------------------------------------
215 
217 
227  vtkSetClampMacro(XValues, int, VTK_XYPLOT_INDEX, VTK_XYPLOT_VALUE);
228  vtkGetMacro(XValues, int);
229  void SetXValuesToIndex() { this->SetXValues(VTK_XYPLOT_INDEX); }
230  void SetXValuesToArcLength() { this->SetXValues(VTK_XYPLOT_ARC_LENGTH); }
232  void SetXValuesToValue() { this->SetXValues(VTK_XYPLOT_VALUE); }
233  const char* GetXValuesAsString();
235 
236  //---Data Object Input------------------------------------------------------
237  // The following methods are used to plot input data objects. Datasets will
238  // be plotted in preference to data objects if set as input; otherwise the
239  // input data objects will be plotted (if defined).
240 
242 
248 
250 
256 
258 
263  vtkSetClampMacro(DataObjectPlotMode, int, VTK_XYPLOT_ROW, VTK_XYPLOT_COLUMN);
264  vtkGetMacro(DataObjectPlotMode, int);
265  void SetDataObjectPlotModeToRows() { this->SetDataObjectPlotMode(VTK_XYPLOT_ROW); }
266  void SetDataObjectPlotModeToColumns() { this->SetDataObjectPlotMode(VTK_XYPLOT_COLUMN); }
269 
271 
279  void SetDataObjectXComponent(int i, int comp);
282 
284 
292  void SetDataObjectYComponent(int i, int comp);
294  //---end Data Object Input--------------------------------------------------
296 
297  //---Per Curve Properties---------------------------------------------------
298  // The following methods are used to set properties on each curve that is
299  // plotted. Each input dataset (or data object) results in one curve. The
300  // methods that follow have an index i that corresponds to the input dataset
301  // or data object.
302  void SetPlotColor(int i, double r, double g, double b);
303  void SetPlotColor(int i, const double color[3])
304  {
305  this->SetPlotColor(i, color[0], color[1], color[2]);
306  }
307  double* GetPlotColor(int i) VTK_SIZEHINT(3);
308  void SetPlotSymbol(int i, vtkPolyData* input);
310  void SetPlotLabel(int i, const char* label);
311  const char* GetPlotLabel(int i);
312 
313  // Allow per-curve specification of line and point rendering. These override
314  // global settings PlotPoints and PlotLines. If not on, the default behavior
315  // is governed by PlotPoints and PlotLines ivars.
316  vtkGetMacro(PlotCurvePoints, vtkTypeBool);
317  vtkSetMacro(PlotCurvePoints, vtkTypeBool);
318  vtkBooleanMacro(PlotCurvePoints, vtkTypeBool);
319 
320  vtkGetMacro(PlotCurveLines, vtkTypeBool);
321  vtkSetMacro(PlotCurveLines, vtkTypeBool);
322  vtkBooleanMacro(PlotCurveLines, vtkTypeBool);
323 
324  void SetPlotLines(int i, int);
325  int GetPlotLines(int i);
326 
327  void SetPlotPoints(int i, int);
328  int GetPlotPoints(int i);
329  //---end Per Curve Properties-----------------------------------------------
330 
332 
336  vtkSetMacro(ExchangeAxes, vtkTypeBool);
337  vtkGetMacro(ExchangeAxes, vtkTypeBool);
338  vtkBooleanMacro(ExchangeAxes, vtkTypeBool);
340 
342 
347  vtkSetMacro(ReverseXAxis, vtkTypeBool);
348  vtkGetMacro(ReverseXAxis, vtkTypeBool);
349  vtkBooleanMacro(ReverseXAxis, vtkTypeBool);
351 
353 
358  vtkSetMacro(ReverseYAxis, vtkTypeBool);
359  vtkGetMacro(ReverseYAxis, vtkTypeBool);
360  vtkBooleanMacro(ReverseYAxis, vtkTypeBool);
362 
364 
370  vtkGetObjectMacro(LegendActor, vtkLegendBoxActor);
371  vtkGetObjectMacro(GlyphSource, vtkGlyphSource2D);
373 
375 
378  vtkSetStringMacro(Title);
379  vtkGetStringMacro(Title);
381 
383 
386  vtkSetStringMacro(XTitle);
387  vtkGetStringMacro(XTitle);
389 
391 
394  virtual void SetYTitle(const char*);
395  char* GetYTitle();
397 
399 
403  vtkAxisActor2D* GetXAxisActor2D() { return this->XAxis; }
404  vtkAxisActor2D* GetYAxisActor2D() { return this->YAxis; }
406 
408 
416  vtkSetVector2Macro(XRange, double);
417  vtkGetVectorMacro(XRange, double, 2);
418  vtkSetVector2Macro(YRange, double);
419  vtkGetVectorMacro(YRange, double, 2);
420  void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
421  {
422  this->SetXRange(xmin, xmax);
423  this->SetYRange(ymin, ymax);
424  }
426 
428 
434  vtkSetClampMacro(NumberOfXLabels, int, 0, 50);
435  vtkGetMacro(NumberOfXLabels, int);
436  vtkSetClampMacro(NumberOfYLabels, int, 0, 50);
437  vtkGetMacro(NumberOfYLabels, int);
438  void SetNumberOfLabels(int num)
439  {
440  this->SetNumberOfXLabels(num);
441  this->SetNumberOfYLabels(num);
442  }
444 
446 
453  void SetAdjustXLabels(int adjust);
454  vtkGetMacro(AdjustXLabels, int);
455  void SetAdjustYLabels(int adjust);
456  vtkGetMacro(AdjustYLabels, int);
458 
460 
463  void SetNumberOfXMinorTicks(int num);
465  void SetNumberOfYMinorTicks(int num);
468 
470 
475  vtkSetMacro(Legend, vtkTypeBool);
476  vtkGetMacro(Legend, vtkTypeBool);
477  vtkBooleanMacro(Legend, vtkTypeBool);
479 
481 
485  vtkSetVector2Macro(TitlePosition, double);
486  vtkGetVector2Macro(TitlePosition, double);
488 
490 
494  vtkSetMacro(AdjustTitlePosition, vtkTypeBool);
495  vtkGetMacro(AdjustTitlePosition, vtkTypeBool);
496  vtkBooleanMacro(AdjustTitlePosition, vtkTypeBool);
498 
500  {
501  AlignLeft = 0x1,
502  AlignRight = 0x2,
503  AlignHCenter = 0x4,
504  AlignTop = 0x10,
505  AlignBottom = 0x20,
506  AlignVCenter = 0x40,
507  AlignAxisLeft = 0x100,
508  AlignAxisRight = 0x200,
509  AlignAxisHCenter = 0x400,
510  AlignAxisTop = 0x1000,
511  AlignAxisBottom = 0x2000,
512  AlignAxisVCenter = 0x4000
513  };
514 
516 
523  vtkSetMacro(AdjustTitlePositionMode, int);
524  vtkGetMacro(AdjustTitlePositionMode, int);
526 
528 
536  vtkSetVector2Macro(LegendPosition, double);
537  vtkGetVector2Macro(LegendPosition, double);
538  vtkSetVector2Macro(LegendPosition2, double);
539  vtkGetVector2Macro(LegendPosition2, double);
541 
543 
547  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
549 
551 
556  vtkGetObjectMacro(AxisTitleTextProperty, vtkTextProperty);
558 
560 
565  vtkGetObjectMacro(AxisLabelTextProperty, vtkTextProperty);
567 
569 
572  vtkSetMacro(Logx, vtkTypeBool);
573  vtkGetMacro(Logx, vtkTypeBool);
574  vtkBooleanMacro(Logx, vtkTypeBool);
576 
578 
582  virtual void SetLabelFormat(const char*);
583  const char* GetLabelFormat() { return this->GetXLabelFormat(); }
585 
587 
590  virtual void SetXLabelFormat(const char*);
591  vtkGetStringMacro(XLabelFormat);
593 
595 
598  virtual void SetYLabelFormat(const char*);
599  vtkGetStringMacro(YLabelFormat);
601 
603 
607  vtkSetClampMacro(Border, int, 0, 50);
608  vtkGetMacro(Border, int);
610 
612 
617  vtkGetMacro(PlotPoints, vtkTypeBool);
618  vtkSetMacro(PlotPoints, vtkTypeBool);
619  vtkBooleanMacro(PlotPoints, vtkTypeBool);
621 
623 
627  vtkGetMacro(PlotLines, vtkTypeBool);
628  vtkSetMacro(PlotLines, vtkTypeBool);
629  vtkBooleanMacro(PlotLines, vtkTypeBool);
631 
633 
638  vtkSetClampMacro(GlyphSize, double, 0.0, 0.2);
639  vtkGetMacro(GlyphSize, double);
641 
646  void ViewportToPlotCoordinate(vtkViewport* viewport, double& u, double& v);
647 
649 
655  vtkSetVector2Macro(PlotCoordinate, double);
656  vtkGetVector2Macro(PlotCoordinate, double);
658 
662  void PlotToViewportCoordinate(vtkViewport* viewport, double& u, double& v);
663 
665 
672  vtkSetVector2Macro(ViewportCoordinate, double);
673  vtkGetVector2Macro(ViewportCoordinate, double);
675 
680  int IsInPlot(vtkViewport* viewport, double u, double v);
681 
683 
687  vtkSetMacro(ChartBox, vtkTypeBool);
688  vtkGetMacro(ChartBox, vtkTypeBool);
689  vtkBooleanMacro(ChartBox, vtkTypeBool);
691 
693 
697  vtkSetMacro(ChartBorder, vtkTypeBool);
698  vtkGetMacro(ChartBorder, vtkTypeBool);
699  vtkBooleanMacro(ChartBorder, vtkTypeBool);
701 
705  vtkProperty2D* GetChartBoxProperty() { return this->ChartBoxActor->GetProperty(); }
706 
708 
711  vtkSetMacro(ShowReferenceXLine, vtkTypeBool);
712  vtkGetMacro(ShowReferenceXLine, vtkTypeBool);
713  vtkBooleanMacro(ShowReferenceXLine, vtkTypeBool);
715 
717 
720  vtkSetMacro(ReferenceXValue, double);
721  vtkGetMacro(ReferenceXValue, double);
723 
725 
728  vtkSetMacro(ShowReferenceYLine, vtkTypeBool);
729  vtkGetMacro(ShowReferenceYLine, vtkTypeBool);
730  vtkBooleanMacro(ShowReferenceYLine, vtkTypeBool);
732 
734 
737  vtkSetMacro(ReferenceYValue, double);
738  vtkGetMacro(ReferenceYValue, double);
740 
744  vtkMTimeType GetMTime() override;
745 
749  void PrintAsCSV(ostream& os);
750 
752 
758  int RenderOverlay(vtkViewport*) override;
759  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
761 
766 
773 
775 
781 
783 
786  vtkSetMacro(YTitlePosition, int);
787  vtkGetMacro(YTitlePosition, int);
788  void SetYTitlePositionToTop() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_TOP); }
789  void SetYTitlePositionToHCenter() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_HCENTER); }
790  void SetYTitlePositionToVCenter() { this->SetYTitlePosition(VTK_XYPLOT_Y_AXIS_VCENTER); }
792 
794 
797  virtual void SetPlotGlyphType(int, int);
798  virtual void SetLineWidth(double);
799  virtual void AddUserCurvesPoint(double, double, double);
800  virtual void RemoveAllActiveCurves();
802 
804 
807  virtual void SetLegendBorder(int);
808  virtual void SetLegendBox(int);
809  virtual void SetLegendUseBackground(int);
810  virtual void SetLegendBackgroundColor(double, double, double);
812 
814 
817  virtual void SetTitleColor(double, double, double);
818  virtual void SetTitleFontFamily(int);
819  virtual void SetTitleBold(int);
820  virtual void SetTitleItalic(int);
821  virtual void SetTitleShadow(int);
822  virtual void SetTitleFontSize(int);
823  virtual void SetTitleJustification(int);
824  virtual void SetTitleVerticalJustification(int);
826 
828 
831  virtual void SetXAxisColor(double, double, double);
832  virtual void SetYAxisColor(double, double, double);
834 
836 
839  virtual void SetAxisTitleColor(double, double, double);
840  virtual void SetAxisTitleFontFamily(int);
841  virtual void SetAxisTitleBold(int);
842  virtual void SetAxisTitleItalic(int);
843  virtual void SetAxisTitleShadow(int);
844  virtual void SetAxisTitleFontSize(int);
845  virtual void SetAxisTitleJustification(int);
848 
850 
853  virtual void SetAxisLabelColor(double, double, double);
854  virtual void SetAxisLabelFontFamily(int);
855  virtual void SetAxisLabelBold(int);
856  virtual void SetAxisLabelItalic(int);
857  virtual void SetAxisLabelShadow(int);
858  virtual void SetAxisLabelFontSize(int);
859  virtual void SetAxisLabelJustification(int);
862 
863 protected:
865  ~vtkXYPlotActor() override;
866 
867  vtkXYPlotActorConnections* InputConnectionHolder;
868  char** SelectedInputScalars; // list of data set arrays to plot
870  vtkXYPlotActorConnections* DataObjectInputConnectionHolder; // list of data objects to plot
871  char* Title;
872  char* XTitle;
874  int XValues;
880  double XRange[2];
881  double YRange[2];
882  double XComputedRange[2]; // range actually used by plot
883  double YComputedRange[2]; // range actually used by plot
884  int Border;
895  double TitlePosition[2];
897 
901 
904 
907 
908  double ViewportCoordinate[2];
909  double PlotCoordinate[2];
910 
911  // Handle data objects and datasets
917 
918  // The data drawn within the axes. Each curve is one polydata.
919  // color is controlled by scalar data. The curves are appended
920  // together, possibly glyphed with point symbols.
928 
929  // Legends and plot symbols. The legend also keeps track of
930  // the symbols and such.
932  double LegendPosition[2];
933  double LegendPosition2[2];
937  double GlyphSize;
938 
939  // Background box
948 
949  // Reference lines
954 
958 
959  // Keep track of changes.
960  int CachedSize[2];
962 
963  void ComputeXRange(double range[2], double* lengths);
964  void ComputeYRange(double range[2]);
965  void ComputeDORange(double xrange[2], double yrange[2], double* lengths);
966 
967  virtual void CreatePlotData(
968  int* pos, int* pos2, double xRange[2], double yRange[2], double* norms, int numDS, int numDO);
969  void PlaceAxes(vtkViewport* viewport, const int* size, int pos[2], int pos2[2]);
970  void GenerateClipPlanes(int* pos, int* pos2);
971  double ComputeGlyphScale(int i, int* pos, int* pos2);
972  void ClipPlotData(int* pos, int* pos2, vtkPolyData* pd);
973  double* TransformPoint(int pos[2], int pos2[2], double x[3], double xNew[3]);
974 
976 
980 
981 private:
982  vtkXYPlotActor(const vtkXYPlotActor&) = delete;
983  void operator=(const vtkXYPlotActor&) = delete;
984 
985  bool DoesConnectionMatch(int i, vtkAlgorithmOutput* in);
986 
987  int IsInputPresent(vtkAlgorithmOutput* in, const char* arrayName, int component);
988 
992  int YTitleSize[2];
993 
997  int YTitlePosition;
998 
1000 
1003  int YTitleDelta;
1005 };
1006 
1007 VTK_ABI_NAMESPACE_END
1008 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:156
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:174
dynamic, self-adjusting array of double
copy oriented and scaled glyph geometry to every input point (2D specialization)
Definition: vtkGlyph2D.h:73
create 2D glyphs represented by vtkPolyData
a simple class to control print indentation
Definition: vtkIndent.h:120
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:156
draw symbols with text
implicit function for convex set of planes
Definition: vtkPlanes.h:163
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:201
represent surface properties of a 2D image
An actor that displays text.
Definition: vtkTextActor.h:167
2D text annotation
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:56
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40
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:187
@ range
Definition: vtkX3D.h:250
@ color
Definition: vtkX3D.h:233
@ position
Definition: vtkX3D.h:273
@ size
Definition: vtkX3D.h:265
int vtkTypeBool
Definition: vtkABI.h:71
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:282
#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