 |
VTK
9.1.0
|
Go to the documentation of this file.
107 #ifndef vtkXYPlotActor_h
108 #define vtkXYPlotActor_h
110 #define VTK_XYPLOT_INDEX 0
111 #define VTK_XYPLOT_ARC_LENGTH 1
112 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
113 #define VTK_XYPLOT_VALUE 3
115 #define VTK_XYPLOT_ROW 0
116 #define VTK_XYPLOT_COLUMN 1
118 #define VTK_XYPLOT_Y_AXIS_TOP 0
119 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
120 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
123 #include "vtkRenderingAnnotationModule.h"
126 class vtkXYPlotActorConnections;
179 this->AddDataSetInputConnection(in,
nullptr, 0);
192 this->RemoveDataSetInputConnection(in,
nullptr, 0);
224 vtkGetMacro(XValues,
int);
260 vtkGetMacro(DataObjectPlotMode,
int);
374 vtkSetStringMacro(Title);
375 vtkGetStringMacro(Title);
382 vtkSetStringMacro(XTitle);
383 vtkGetStringMacro(XTitle);
412 vtkSetVector2Macro(XRange,
double);
413 vtkGetVectorMacro(XRange,
double, 2);
414 vtkSetVector2Macro(YRange,
double);
415 vtkGetVectorMacro(YRange,
double, 2);
418 this->SetXRange(xmin, xmax);
419 this->SetYRange(ymin, ymax);
430 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
431 vtkGetMacro(NumberOfXLabels,
int);
432 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
433 vtkGetMacro(NumberOfYLabels,
int);
436 this->SetNumberOfXLabels(num);
437 this->SetNumberOfYLabels(num);
450 vtkGetMacro(AdjustXLabels,
int);
452 vtkGetMacro(AdjustYLabels,
int);
481 vtkSetVector2Macro(TitlePosition,
double);
482 vtkGetVector2Macro(TitlePosition,
double);
503 AlignAxisLeft = 0x100,
504 AlignAxisRight = 0x200,
505 AlignAxisHCenter = 0x400,
506 AlignAxisTop = 0x1000,
507 AlignAxisBottom = 0x2000,
508 AlignAxisVCenter = 0x4000
519 vtkSetMacro(AdjustTitlePositionMode,
int);
520 vtkGetMacro(AdjustTitlePositionMode,
int);
532 vtkSetVector2Macro(LegendPosition,
double);
533 vtkGetVector2Macro(LegendPosition,
double);
534 vtkSetVector2Macro(LegendPosition2,
double);
535 vtkGetVector2Macro(LegendPosition2,
double);
587 vtkGetStringMacro(XLabelFormat);
595 vtkGetStringMacro(YLabelFormat);
603 vtkSetClampMacro(Border,
int, 0, 50);
604 vtkGetMacro(Border,
int);
634 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
635 vtkGetMacro(GlyphSize,
double);
651 vtkSetVector2Macro(PlotCoordinate,
double);
652 vtkGetVector2Macro(PlotCoordinate,
double);
668 vtkSetVector2Macro(ViewportCoordinate,
double);
669 vtkGetVector2Macro(ViewportCoordinate,
double);
716 vtkSetMacro(ReferenceXValue,
double);
717 vtkGetMacro(ReferenceXValue,
double);
733 vtkSetMacro(ReferenceYValue,
double);
734 vtkGetMacro(ReferenceYValue,
double);
782 vtkSetMacro(YTitlePosition,
int);
783 vtkGetMacro(YTitlePosition,
int);
878 double XComputedRange[2];
879 double YComputedRange[2];
891 double TitlePosition[2];
904 double ViewportCoordinate[2];
905 double PlotCoordinate[2];
928 double LegendPosition[2];
929 double LegendPosition2[2];
964 int* pos,
int* pos2,
double xRange[2],
double yRange[2],
double* norms,
int numDS,
int numDO);
virtual void SetAxisTitleFontSize(int)
Set axis title properties.
double * GetPlotColor(int i)
const char * GetPlotLabel(int i)
create 2D glyphs represented by vtkPolyData
virtual void SetAxisLabelShadow(int)
Set axis label properties.
draw vtkPolyData onto the image plane
const char * GetDataObjectPlotModeAsString()
Indicate whether to plot rows or columns.
virtual void SetLabelFormat(const char *)
Set/Get the format with which to print the labels .
virtual void SetAxisLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property of all axes.
virtual void SetXAxisColor(double, double, double)
Set axes properties.
~vtkXYPlotActor() override
int GetNumberOfYMinorTicks()
Set/Get the number of minor ticks in X or Y.
void AddDataObjectInputConnection(vtkAlgorithmOutput *alg)
Add a data object to the list of data to display.
int GetPointComponent(int i)
If plotting points by value, which component to use to determine the value.
virtual void SetAxisLabelVerticalJustification(int)
Set axis label properties.
virtual void SetLegendBackgroundColor(double, double, double)
Set legend properties.
double * TransformPoint(int pos[2], int pos2[2], double x[3], double xNew[3])
void AddDataObjectInput(vtkDataObject *in)
Add a data object to the list of data to display.
vtkAxisActor2D * GetYAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example)
void SetPointComponent(int i, int comp)
If plotting points by value, which component to use to determine the value.
void RemoveAllDataSetInputConnections()
This removes all of the data set inputs, but does not change the data object inputs.
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.
virtual void SetYLabelFormat(const char *)
Set/Get the format with which to print the Y label.
maintain an unordered list of data objects
vtkTypeBool ShowReferenceYLine
virtual void SetAxisTitleColor(double, double, double)
Set axis title properties.
record modification and/or execution time
virtual void SetAxisLabelFontFamily(int)
Set axis label properties.
virtual void SetTitleShadow(int)
Set title properties.
int GetNumberOfXMinorTicks()
Set/Get the number of minor ticks in X or Y.
vtkTextMapper * TitleMapper
void SetPlotLabel(int i, const char *label)
void SetXValuesToArcLength()
Specify how the independent (x) variable is computed from the points.
virtual void SetAxisLabelBold(int)
Set axis label properties.
copy oriented and scaled glyph geometry to every input point (2D specialization)
void SetNumberOfYMinorTicks(int num)
Set/Get the number of minor ticks in X or Y.
void SetXValuesToValue()
Specify how the independent (x) variable is computed from the points.
void SetPlotSymbol(int i, vtkPolyData *input)
virtual void SetYAxisColor(double, double, double)
Set axes properties.
int RenderOpaqueGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void RemoveDataSetInput(vtkDataSet *ds, const char *arrayName, int component)
Remove a dataset from the list of data to append.
virtual void SetAxisTitleBold(int)
Set axis title properties.
vtkGlyphSource2D * GlyphSource
vtkPolyData * ReferenceLinesPolyData
virtual void SetYTitle(const char *)
Set/Get the title of the y axis.
double ComputeGlyphScale(int i, int *pos, int *pos2)
vtkActor2D * ChartBorderActor
virtual void SetLegendUseBackground(int)
Set legend properties.
vtkMTimeType GetMTime() override
Take into account the modified time of internal helper classes.
void RemoveDataSetInputConnection(vtkAlgorithmOutput *in, const char *arrayName, int component)
Remove a dataset from the list of data to append.
void PlotToViewportCoordinate(vtkViewport *viewport, double &u, double &v)
Given a plot coordinate, return the viewpoint position.
void SetYTitlePositionToVCenter()
Set/Get the position of the title of Y axis.
virtual void SetTitleFontSize(int)
Set title properties.
void SetYTitlePositionToTop()
Set/Get the position of the title of Y axis.
virtual void SetAxisTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property of all axes.
void RemoveDataObjectInputConnection(vtkAlgorithmOutput *aout)
Remove a dataset from the list of data to display.
virtual void SetXLabelFormat(const char *)
Set/Get the format with which to print the X label.
#define VTK_XYPLOT_Y_AXIS_TOP
implicit function for convex set of planes
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property.
virtual void RemoveAllActiveCurves()
Set plot properties.
void RemoveDataObjectInput(vtkDataObject *in)
Remove a dataset from the list of data to display.
virtual void SetTitleVerticalJustification(int)
Set title properties.
void PlotToViewportCoordinate(vtkViewport *viewport)
An alternate form of PlotToViewportCoordinate() above.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
vtkTextProperty * TitleTextProperty
virtual void SetAxisTitleVerticalJustification(int)
Set axis title properties.
virtual void SetTitleBold(int)
Set title properties.
window superclass for vtkRenderWindow
vtkTypeBool ShowReferenceXLine
void SetAdjustYLabels(int adjust)
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
void SetXValuesToNormalizedArcLength()
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.
virtual void SetPlotGlyphType(int, int)
Set plot properties.
vtkAppendPolyData ** PlotAppend
appends one or more polygonal datasets together
virtual void SetAxisLabelItalic(int)
Set axis label properties.
virtual void SetAxisTitleItalic(int)
Set axis title properties.
#define VTK_SIZEHINT(...)
virtual void SetTitleJustification(int)
Set title properties.
vtkPolyDataMapper2D * ChartBoxMapper
void PrintAsCSV(ostream &os)
Write the XY Ploat Actor as a CSV (comma separated value) representation.
virtual void AddUserCurvesPoint(double, double, double)
Set plot properties.
virtual void SetAxisLabelFontSize(int)
Set axis label properties.
int RenderOverlay(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
void AddDataSetInput(vtkDataSet *ds, const char *arrayName, int component)
Add a dataset to the list of data to append.
void GenerateClipPlanes(int *pos, int *pos2)
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
static vtkXYPlotActor * New()
Instantiate object with autorange computation; bold, italic, and shadows on; arial font family; the n...
void ComputeYRange(double range[2])
void SetDataObjectXComponent(int i, int comp)
Specify which component of the input data object to use as the independent variable for the ith input...
vtkTypeBool AdjustTitlePosition
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
virtual void SetTitleItalic(int)
Set title properties.
#define VTK_XYPLOT_ARC_LENGTH
vtkTextProperty * AxisTitleTextProperty
An actor that displays text.
a simple class to control print indentation
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
dynamic, self-adjusting array of int
virtual void SetAxisTitleShadow(int)
Set axis title properties.
void ComputeXRange(double range[2], double *lengths)
vtkPolyData * ChartBoxPolyData
char ** SelectedInputScalars
vtkActor2D * ReferenceLinesActor
void ComputeDORange(double xrange[2], double yrange[2], double *lengths)
void SetXTitlePosition(double position)
Set/Get the position of the title of X axis.
virtual void SetAxisTitleJustification(int)
Set axis title properties.
virtual void SetTitleFontFamily(int)
Set title properties.
virtual void SetAxisTitleFontFamily(int)
Set axis title properties.
void SetPlotColor(int i, double r, double g, double b)
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
Add a dataset to the list of data to append.
char * GetYTitle()
Set/Get the title of the y axis.
virtual void SetLegendBox(int)
Set legend properties.
vtkTypeBool PlotCurveLines
abstract specification for Viewports
#define VTK_XYPLOT_Y_AXIS_HCENTER
void PlaceAxes(vtkViewport *viewport, const int *size, int pos[2], int pos2[2])
virtual void SetAxisLabelColor(double, double, double)
Set axis label properties.
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
void SetAdjustXLabels(int adjust)
Set/Get the flag that controls whether the labels and ticks are adjusted for "nice" numerical values ...
vtkPolyData * ChartBorderPolyData
vtkLegendBoxActor * LegendActor
abstract class to specify dataset behavior
represent text properties.
generate an x-y plot from input dataset(s) or field data
vtkActor2D * ChartBoxActor
void SetXValuesToIndex()
Specify how the independent (x) variable is computed from the points.
represent surface properties of a 2D image
vtkPolyDataMapper2D * ReferenceLinesMapper
a actor that draws 2D data
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...
void SetDataObjectPlotModeToColumns()
Indicate whether to plot rows or columns.
virtual void CreatePlotData(int *pos, int *pos2, double xRange[2], double yRange[2], double *norms, int numDS, int numDO)
Proxy object to connect input/output ports.
void AddDataSetInputConnection(vtkAlgorithmOutput *in, const char *arrayName, int component)
Add a dataset to the list of data to append.
const char * GetLabelFormat()
Set/Get the format with which to print the labels .
void ViewportToPlotCoordinate(vtkViewport *viewport)
An alternate form of ViewportToPlotCoordinate() above.
#define VTK_XYPLOT_COLUMN
#define VTK_XYPLOT_Y_AXIS_VCENTER
void RemoveDataSetInput(vtkDataSet *ds)
Remove a dataset from the list of data to append.
vtkTextActor * YTitleActor
concrete dataset represents vertices, lines, polygons, and triangle strips
Create an axis with tick marks and labels.
const char * GetXValuesAsString()
Specify how the independent (x) variable is computed from the points.
vtkAxisActor2D * GetXAxisActor2D()
Retrieve handles to the X and Y axis (so that you can set their text properties for example)
maintain an unordered list of dataset objects
int GetDataObjectXComponent(int i)
Specify which component of the input data object to use as the independent variable for the ith input...
void SetPlotPoints(int i, int)
double GetXTitlePosition()
Set/Get the position of the title of X axis.
virtual void SetLineWidth(double)
Set plot properties.
void SetPlotColor(int i, const double color[3])
dynamic, self-adjusting array of double
virtual void SetTitleColor(double, double, double)
Set title properties.
vtkXYPlotActorConnections * InputConnectionHolder
vtkTextProperty * AxisLabelTextProperty
vtkPolyDataMapper2D ** PlotMapper
void ClipPlotData(int *pos, int *pos2, vtkPolyData *pd)
int GetDataObjectYComponent(int i)
Specify which component of the input data object to use as the dependent variable for the ith input d...
virtual void SetLegendBorder(int)
Set legend properties.
int AdjustTitlePositionMode
general representation of visualization data
vtkPolyData * GetPlotSymbol(int i)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkDoubleArray > ActiveCurve
void SetNumberOfLabels(int num)
Set/Get the number of annotation labels to show along the x and y axes.
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...
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 SetYTitlePositionToHCenter()
Set/Get the position of the title of Y axis.
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
void SetDataObjectPlotModeToRows()
Indicate whether to plot rows or columns.
void SetPlotLines(int i, int)
void SetPlotRange(double xmin, double ymin, double xmax, double ymax)
Set the plot range (range of independent and dependent variables) to plot.
vtkTypeBool PlotCurvePoints
virtual void SetAxisLabelJustification(int)
Set axis label properties.
vtkTypeUInt32 vtkMTimeType
vtkIntArray * SelectedInputScalarsComponent
vtkPolyDataMapper2D * ChartBorderMapper