94 #ifndef vtkXYPlotActor_h
95 #define vtkXYPlotActor_h
97 #define VTK_XYPLOT_INDEX 0
98 #define VTK_XYPLOT_ARC_LENGTH 1
99 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
100 #define VTK_XYPLOT_VALUE 3
102 #define VTK_XYPLOT_ROW 0
103 #define VTK_XYPLOT_COLUMN 1
105 #define VTK_XYPLOT_Y_AXIS_TOP 0
106 #define VTK_XYPLOT_Y_AXIS_HCENTER 1
107 #define VTK_XYPLOT_Y_AXIS_VCENTER 2 // rotate by 90 degrees (y-axis aligned)
109 #include "vtkRenderingAnnotationModule.h"
113 class vtkXYPlotActorConnections;
176 this->RemoveDataSetInputConnection(in, NULL, 0);
184 void RemoveAllDataSetInputConnections();
191 void SetPointComponent(
int i,
int comp);
192 int GetPointComponent(
int i);
208 vtkGetMacro(XValues,
int);
214 const char *GetXValuesAsString();
245 vtkGetMacro(DataObjectPlotMode,
int);
250 const char *GetDataObjectPlotModeAsString();
262 void SetDataObjectXComponent(
int i,
int comp);
263 int GetDataObjectXComponent(
int i);
275 void SetDataObjectYComponent(
int i,
int comp);
276 int GetDataObjectYComponent(
int i);
285 void SetPlotColor(
int i,
double r,
double g,
double b);
287 this->SetPlotColor(i, color[0], color[1], color[2]); };
288 double *GetPlotColor(
int i);
291 void SetPlotLabel(
int i,
const char *label);
292 const char *GetPlotLabel(
int i);
297 vtkGetMacro(PlotCurvePoints,
int);
301 vtkGetMacro(PlotCurveLines,
int);
305 void SetPlotLines(
int i,
int);
306 int GetPlotLines(
int i);
308 void SetPlotPoints(
int i,
int);
309 int GetPlotPoints(
int i);
318 vtkGetMacro(ExchangeAxes,
int);
329 vtkGetMacro(ReverseXAxis,
int);
340 vtkGetMacro(ReverseYAxis,
int);
359 vtkSetStringMacro(Title);
367 vtkSetStringMacro(XTitle);
375 virtual void SetYTitle(
const char* );
403 vtkSetVector2Macro(XRange,
double);
404 vtkGetVectorMacro(XRange,
double,2);
405 vtkSetVector2Macro(YRange,
double);
406 vtkGetVectorMacro(YRange,
double,2);
408 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
418 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
419 vtkGetMacro(NumberOfXLabels,
int);
420 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
421 vtkGetMacro(NumberOfYLabels,
int);
423 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
434 void SetAdjustXLabels(
int adjust);
435 vtkGetMacro( AdjustXLabels,
int );
436 void SetAdjustYLabels(
int adjust);
437 vtkGetMacro( AdjustYLabels,
int );
444 void SetNumberOfXMinorTicks(
int num);
445 int GetNumberOfXMinorTicks();
446 void SetNumberOfYMinorTicks(
int num);
447 int GetNumberOfYMinorTicks();
457 vtkGetMacro(Legend,
int);
466 vtkSetVector2Macro(TitlePosition,
double);
467 vtkGetVector2Macro(TitlePosition,
double);
476 vtkGetMacro(AdjustTitlePosition,
int);
487 AlignAxisLeft = 0x100,
488 AlignAxisRight = 0x200,
489 AlignAxisHCenter = 0x400,
490 AlignAxisTop = 0x1000,
491 AlignAxisBottom = 0x2000,
492 AlignAxisVCenter = 0x4000
504 vtkGetMacro(AdjustTitlePositionMode,
int);
516 vtkSetVector2Macro(LegendPosition,
double);
517 vtkGetVector2Macro(LegendPosition,
double);
518 vtkSetVector2Macro(LegendPosition2,
double);
519 vtkGetVector2Macro(LegendPosition2,
double);
553 vtkGetMacro(Logx,
int);
562 virtual void SetLabelFormat (
const char* );
565 return this->GetXLabelFormat();
573 virtual void SetXLabelFormat (
const char* );
581 virtual void SetYLabelFormat (
const char* );
590 vtkSetClampMacro(Border,
int, 0, 50);
591 vtkGetMacro(Border,
int);
600 vtkGetMacro(PlotPoints,
int);
610 vtkGetMacro(PlotLines,
int);
621 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
622 vtkGetMacro(GlyphSize,
double);
629 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
637 void ViewportToPlotCoordinate(
vtkViewport *viewport);
638 vtkSetVector2Macro(PlotCoordinate,
double);
639 vtkGetVector2Macro(PlotCoordinate,
double);
645 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
654 void PlotToViewportCoordinate(
vtkViewport *viewport);
655 vtkSetVector2Macro(ViewportCoordinate,
double);
656 vtkGetVector2Macro(ViewportCoordinate,
double);
663 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
671 vtkGetMacro(ChartBox,
int);
681 vtkGetMacro(ChartBorder,
int);
695 vtkGetMacro(ShowReferenceXLine,
int);
704 vtkGetMacro(ReferenceXValue,
double);
712 vtkGetMacro(ShowReferenceYLine,
int);
721 vtkGetMacro(ReferenceYValue,
double);
732 void PrintAsCSV(ostream &os);
761 void SetXTitlePosition(
double position);
762 double GetXTitlePosition();
770 vtkGetMacro(YTitlePosition,
int);
789 virtual void SetPlotGlyphType(
int,
int );
790 virtual void SetLineWidth(
double );
791 virtual void AddUserCurvesPoint(
double,
double,
double );
792 virtual void RemoveAllActiveCurves();
799 virtual void SetLegendBorder(
int );
800 virtual void SetLegendBox(
int );
801 virtual void SetLegendUseBackground(
int );
802 virtual void SetLegendBackgroundColor(
double,
double,
double );
809 virtual void SetTitleColor(
double,
double,
double );
810 virtual void SetTitleFontFamily(
int );
811 virtual void SetTitleBold(
int );
812 virtual void SetTitleItalic(
int );
813 virtual void SetTitleShadow(
int );
814 virtual void SetTitleFontSize(
int );
815 virtual void SetTitleJustification(
int );
816 virtual void SetTitleVerticalJustification(
int );
823 virtual void SetXAxisColor(
double,
double,
double );
824 virtual void SetYAxisColor(
double,
double,
double );
831 virtual void SetAxisTitleColor(
double,
double,
double );
832 virtual void SetAxisTitleFontFamily(
int );
833 virtual void SetAxisTitleBold(
int );
834 virtual void SetAxisTitleItalic(
int );
835 virtual void SetAxisTitleShadow(
int );
836 virtual void SetAxisTitleFontSize(
int );
837 virtual void SetAxisTitleJustification(
int );
838 virtual void SetAxisTitleVerticalJustification(
int );
845 virtual void SetAxisLabelColor(
double,
double,
double );
846 virtual void SetAxisLabelFontFamily(
int );
847 virtual void SetAxisLabelBold(
int );
848 virtual void SetAxisLabelItalic(
int );
849 virtual void SetAxisLabelShadow(
int );
850 virtual void SetAxisLabelFontSize(
int );
851 virtual void SetAxisLabelJustification(
int );
852 virtual void SetAxisLabelVerticalJustification(
int );
874 double XComputedRange[2];
875 double YComputedRange[2];
887 double TitlePosition[2];
900 double ViewportCoordinate[2];
901 double PlotCoordinate[2];
919 void InitializeEntries();
924 double LegendPosition[2];
925 double LegendPosition2[2];
955 void ComputeXRange(
double range[2],
double *lengths);
956 void ComputeYRange(
double range[2]);
957 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
959 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
960 double yRange[2],
double *norms,
961 int numDS,
int numDO);
962 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
963 void GenerateClipPlanes(
int *pos,
int *pos2);
964 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
965 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
966 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
981 const
char* arrayName,
vtkPolyDataMapper2D * ChartBorderMapper
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
vtkLegendBoxActor * LegendActor
maintain an unordered list of dataset objects
copy oriented and scaled glyph geometry to every input point (2D specialization)
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
vtkXYPlotActorConnections * InputConnectionHolder
abstract specification for Viewports
vtkPolyDataMapper2D * ReferenceLinesMapper
abstract class to specify dataset behavior
void AddDataSetInputConnection(vtkAlgorithmOutput *in)
Add a dataset to the list of data to append.
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
virtual int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
vtkTypeUInt64 vtkMTimeType
vtkProperty2D * GetChartBoxProperty()
Get the box vtkProperty2D.
Proxy object to connect input/output ports.
virtual vtkMTimeType GetMTime() override
Return this objects MTime.
vtkPolyData * ChartBorderPolyData
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
vtkPolyDataMapper2D ** PlotMapper
vtkActor2D * ChartBoxActor
vtkXYPlotActorConnections * DataObjectInputConnectionHolder
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
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
virtual void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
vtkTextMapper * TitleMapper
vtkTextProperty * AxisLabelTextProperty
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.
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
void SetXValuesToNormalizedArcLength()
Specify how the independent (x) variable is computed from the points.
virtual int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
virtual int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
void SetDataObjectPlotModeToRows()
Indicate whether to plot rows or columns.
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
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.
vtkIntArray * SelectedInputScalarsComponent
vtkPolyData * ReferenceLinesPolyData
vtkActor2D * ReferenceLinesActor
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
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
void SetYTitlePositionToTop()
Set/Get the position of the title of Y axis.