79 #ifndef vtkXYPlotActor_h
80 #define vtkXYPlotActor_h
82 #define VTK_XYPLOT_INDEX 0
83 #define VTK_XYPLOT_ARC_LENGTH 1
84 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
85 #define VTK_XYPLOT_VALUE 3
87 #define VTK_XYPLOT_ROW 0
88 #define VTK_XYPLOT_COLUMN 1
90 #define VTK_XYPLOT_Y_AXIS_TOP 0
91 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
92 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
95 #include "vtkRenderingAnnotationModule.h"
99 VTK_ABI_NAMESPACE_BEGIN
100 class vtkXYPlotActorConnections;
154 this->AddDataSetInputConnection(in,
nullptr, 0);
168 this->RemoveDataSetInputConnection(in,
nullptr, 0);
176 void RemoveAllDataSetInputConnections();
186 unsigned int GetNumberOfDataSetInputConnections();
193 void SetPointComponent(
int i,
int comp);
194 int GetPointComponent(
int i);
210 vtkGetMacro(XValues,
int);
215 const char* GetXValuesAsString();
244 void RemoveAllDataObjectInputConnections();
254 unsigned int GetNumberOfDataObjectInputConnections();
263 vtkGetMacro(DataObjectPlotMode,
int);
264 void SetDataObjectPlotModeToRows() { this->SetDataObjectPlotMode(VTK_XYPLOT_ROW); }
266 const char* GetDataObjectPlotModeAsString();
278 void SetDataObjectXComponent(
int i,
int comp);
279 int GetDataObjectXComponent(
int i);
291 void SetDataObjectYComponent(
int i,
int comp);
292 int GetDataObjectYComponent(
int i);
301 void SetPlotColor(
int i,
double r,
double g,
double b);
304 this->SetPlotColor(i, color[0], color[1], color[2]);
309 void SetPlotLabel(
int i,
const char* label);
310 const char* GetPlotLabel(
int i);
323 void SetPlotLines(
int i,
int);
324 int GetPlotLines(
int i);
326 void SetPlotPoints(
int i,
int);
327 int GetPlotPoints(
int i);
377 vtkSetStringMacro(Title);
378 vtkGetStringMacro(Title);
385 vtkSetStringMacro(XTitle);
386 vtkGetStringMacro(XTitle);
393 virtual void SetYTitle(
const char*);
415 vtkSetVector2Macro(XRange,
double);
416 vtkGetVectorMacro(XRange,
double, 2);
417 vtkSetVector2Macro(YRange,
double);
418 vtkGetVectorMacro(YRange,
double, 2);
421 this->SetXRange(xmin, xmax);
422 this->SetYRange(ymin, ymax);
433 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
434 vtkGetMacro(NumberOfXLabels,
int);
435 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
436 vtkGetMacro(NumberOfYLabels,
int);
439 this->SetNumberOfXLabels(num);
440 this->SetNumberOfYLabels(num);
452 void SetAdjustXLabels(
int adjust);
453 vtkGetMacro(AdjustXLabels,
int);
454 void SetAdjustYLabels(
int adjust);
455 vtkGetMacro(AdjustYLabels,
int);
462 void SetNumberOfXMinorTicks(
int num);
463 int GetNumberOfXMinorTicks();
464 void SetNumberOfYMinorTicks(
int num);
465 int GetNumberOfYMinorTicks();
484 vtkSetVector2Macro(TitlePosition,
double);
485 vtkGetVector2Macro(TitlePosition,
double);
506 AlignAxisLeft = 0x100,
507 AlignAxisRight = 0x200,
508 AlignAxisHCenter = 0x400,
509 AlignAxisTop = 0x1000,
510 AlignAxisBottom = 0x2000,
511 AlignAxisVCenter = 0x4000
522 vtkSetMacro(AdjustTitlePositionMode,
int);
523 vtkGetMacro(AdjustTitlePositionMode,
int);
535 vtkSetVector2Macro(LegendPosition,
double);
536 vtkGetVector2Macro(LegendPosition,
double);
537 vtkSetVector2Macro(LegendPosition2,
double);
538 vtkGetVector2Macro(LegendPosition2,
double);
581 virtual void SetLabelFormat(
const char*);
589 virtual void SetXLabelFormat(
const char*);
590 vtkGetStringMacro(XLabelFormat);
597 virtual void SetYLabelFormat(
const char*);
598 vtkGetStringMacro(YLabelFormat);
606 vtkSetClampMacro(Border,
int, 0, 50);
607 vtkGetMacro(Border,
int);
637 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
638 vtkGetMacro(GlyphSize,
double);
645 void ViewportToPlotCoordinate(
vtkViewport* viewport,
double& u,
double& v);
653 void ViewportToPlotCoordinate(
vtkViewport* viewport);
654 vtkSetVector2Macro(PlotCoordinate,
double);
655 vtkGetVector2Macro(PlotCoordinate,
double);
661 void PlotToViewportCoordinate(
vtkViewport* viewport,
double& u,
double& v);
670 void PlotToViewportCoordinate(
vtkViewport* viewport);
671 vtkSetVector2Macro(ViewportCoordinate,
double);
672 vtkGetVector2Macro(ViewportCoordinate,
double);
679 int IsInPlot(
vtkViewport* viewport,
double u,
double v);
719 vtkSetMacro(ReferenceXValue,
double);
720 vtkGetMacro(ReferenceXValue,
double);
736 vtkSetMacro(ReferenceYValue,
double);
737 vtkGetMacro(ReferenceYValue,
double);
748 void PrintAsCSV(ostream& os);
777 void SetXTitlePosition(
double position);
778 double GetXTitlePosition();
785 vtkSetMacro(YTitlePosition,
int);
786 vtkGetMacro(YTitlePosition,
int);
796 virtual void SetPlotGlyphType(
int,
int);
797 virtual void SetLineWidth(
double);
798 virtual void AddUserCurvesPoint(
double,
double,
double);
799 virtual void RemoveAllActiveCurves();
806 virtual void SetLegendBorder(
int);
807 virtual void SetLegendBox(
int);
808 virtual void SetLegendUseBackground(
int);
809 virtual void SetLegendBackgroundColor(
double,
double,
double);
816 virtual void SetTitleColor(
double,
double,
double);
817 virtual void SetTitleFontFamily(
int);
818 virtual void SetTitleBold(
int);
819 virtual void SetTitleItalic(
int);
820 virtual void SetTitleShadow(
int);
821 virtual void SetTitleFontSize(
int);
822 virtual void SetTitleJustification(
int);
823 virtual void SetTitleVerticalJustification(
int);
830 virtual void SetXAxisColor(
double,
double,
double);
831 virtual void SetYAxisColor(
double,
double,
double);
838 virtual void SetAxisTitleColor(
double,
double,
double);
839 virtual void SetAxisTitleFontFamily(
int);
840 virtual void SetAxisTitleBold(
int);
841 virtual void SetAxisTitleItalic(
int);
842 virtual void SetAxisTitleShadow(
int);
843 virtual void SetAxisTitleFontSize(
int);
844 virtual void SetAxisTitleJustification(
int);
845 virtual void SetAxisTitleVerticalJustification(
int);
852 virtual void SetAxisLabelColor(
double,
double,
double);
853 virtual void SetAxisLabelFontFamily(
int);
854 virtual void SetAxisLabelBold(
int);
855 virtual void SetAxisLabelItalic(
int);
856 virtual void SetAxisLabelShadow(
int);
857 virtual void SetAxisLabelFontSize(
int);
858 virtual void SetAxisLabelJustification(
int);
859 virtual void SetAxisLabelVerticalJustification(
int);
881 double XComputedRange[2];
882 double YComputedRange[2];
894 double TitlePosition[2];
907 double ViewportCoordinate[2];
908 double PlotCoordinate[2];
926 void InitializeEntries();
931 double LegendPosition[2];
932 double LegendPosition2[2];
962 void ComputeXRange(
double range[2],
double* lengths);
963 void ComputeYRange(
double range[2]);
964 void ComputeDORange(
double xrange[2],
double yrange[2],
double* lengths);
966 virtual void CreatePlotData(
967 int* pos,
int* pos2,
double xRange[2],
double yRange[2],
double* norms,
int numDS,
int numDO);
968 void PlaceAxes(
vtkViewport* viewport,
const int*
size,
int pos[2],
int pos2[2]);
969 void GenerateClipPlanes(
int* pos,
int* pos2);
970 double ComputeGlyphScale(
int i,
int* pos,
int* pos2);
971 void ClipPlotData(
int* pos,
int* pos2,
vtkPolyData* pd);
972 double* TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
1006 VTK_ABI_NAMESPACE_END
vtkPolyDataMapper2D * ChartBorderMapper
const char * GetLabelFormat()
Set/Get the std::format or printf style 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)
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
vtkXYPlotActorConnections * InputConnectionHolder
vtkTypeUInt32 vtkMTimeType
abstract specification for Viewports
vtkPolyDataMapper2D * ReferenceLinesMapper
vtkNew< vtkAxisActor2D > YAxis
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
vtkTextProperty * AxisTitleTextProperty
#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.
char ** SelectedInputScalars
concrete dataset represents vertices, lines, polygons, and triangle strips
vtkSmartPointer< vtkDoubleArray > ActiveCurve
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
Proxy object to connect input/output ports.
vtkPolyData * ChartBorderPolyData
dynamic, self-adjusting array of double
vtkTypeBool PlotCurveLines
#define VTK_XYPLOT_Y_AXIS_HCENTER
vtkTypeBool ShowReferenceYLine
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
vtkPolyDataMapper2D ** PlotMapper
vtkActor2D * ChartBoxActor
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
#define VTK_MARSHALMANUAL
vtkTypeBool AdjustTitlePosition
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
a simple class to control print indentation
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
vtkAppendPolyData ** PlotAppend
void SetPlotColor(int i, const double color[3])
appends one or more polygonal datasets together
vtkGlyphSource2D * GlyphSource
vtkNew< vtkAxisActor2D > XAxis
vtkTextMapper * TitleMapper
vtkTextProperty * AxisLabelTextProperty
#define VTK_SIZEHINT(...)
represent text properties.
#define VTK_MARSHALEXCLUDE(reason)
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.
vtkTypeBool PlotCurvePoints
void SetXValuesToArcLength()
Specify how the independent (x) variable is computed from the points.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
void SetXValuesToValue()
Specify how the independent (x) variable is computed from the points.
vtkTextProperty * TitleTextProperty
vtkActor2D * ChartBorderActor
#define VTK_XYPLOT_NORMALIZED_ARC_LENGTH
void SetYTitlePositionToVCenter()
Set/Get the position of the title of Y axis.
#define VTK_XYPLOT_COLUMN
vtkTypeBool ShowReferenceXLine
void SetXValuesToNormalizedArcLength()
Specify how the independent (x) variable is computed from the points.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
vtkTextActor * YTitleActor
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
vtkPolyDataMapper2D * ChartBoxMapper
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.
vtkIntArray * SelectedInputScalarsComponent
vtkPolyData * ReferenceLinesPolyData
vtkActor2D * ReferenceLinesActor
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
general representation of visualization data
void RemoveDataSetInput(vtkDataSet *ds)
Remove a dataset from the list of data to append.
int AdjustTitlePositionMode
draw vtkPolyData onto the image plane
vtkNew< vtkLegendBoxActor > LegendActor
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyData * ChartBoxPolyData
void SetDataObjectPlotModeToColumns()
Indicate whether to plot rows or columns.
#define VTK_XYPLOT_Y_AXIS_VCENTER
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
void SetYTitlePositionToTop()
Set/Get the position of the title of Y axis.