87 #ifndef __vtkXYPlotActor_h
88 #define __vtkXYPlotActor_h
90 #define VTK_XYPLOT_INDEX 0
91 #define VTK_XYPLOT_ARC_LENGTH 1
92 #define VTK_XYPLOT_NORMALIZED_ARC_LENGTH 2
93 #define VTK_XYPLOT_VALUE 3
95 #define VTK_XYPLOT_ROW 0
96 #define VTK_XYPLOT_COLUMN 1
98 #include "vtkRenderingAnnotationModule.h"
101 class vtkXYPlotActorConnections;
156 this->RemoveDataSetInputConnection(in, NULL, 0);
162 void RemoveAllDataSetInputConnections();
168 void SetPointComponent(
int i,
int comp);
169 int GetPointComponent(
int i);
183 vtkGetMacro(XValues,
int);
186 void SetXValuesToNormalizedArcLength()
189 const char *GetXValuesAsString();
213 vtkGetMacro(DataObjectPlotMode,
int);
214 void SetDataObjectPlotModeToRows()
216 void SetDataObjectPlotModeToColumns()
218 const char *GetDataObjectPlotModeAsString();
228 void SetDataObjectXComponent(
int i,
int comp);
229 int GetDataObjectXComponent(
int i);
239 void SetDataObjectYComponent(
int i,
int comp);
240 int GetDataObjectYComponent(
int i);
249 void SetPlotColor(
int i,
double r,
double g,
double b);
251 this->SetPlotColor(i, color[0], color[1], color[2]); };
252 double *GetPlotColor(
int i);
255 void SetPlotLabel(
int i,
const char *label);
256 const char *GetPlotLabel(
int i);
261 vtkGetMacro(PlotCurvePoints,
int);
262 vtkSetMacro(PlotCurvePoints,
int);
263 vtkBooleanMacro(PlotCurvePoints,
int);
265 vtkGetMacro(PlotCurveLines,
int);
266 vtkSetMacro(PlotCurveLines,
int);
267 vtkBooleanMacro(PlotCurveLines,
int);
269 void SetPlotLines(
int i,
int);
270 int GetPlotLines(
int i);
272 void SetPlotPoints(
int i,
int);
273 int GetPlotPoints(
int i);
279 vtkSetMacro(ExchangeAxes,
int);
280 vtkGetMacro(ExchangeAxes,
int);
281 vtkBooleanMacro(ExchangeAxes,
int);
289 vtkSetMacro(ReverseXAxis,
int);
290 vtkGetMacro(ReverseXAxis,
int);
291 vtkBooleanMacro(ReverseXAxis,
int);
299 vtkSetMacro(ReverseYAxis,
int);
300 vtkGetMacro(ReverseYAxis,
int);
301 vtkBooleanMacro(ReverseYAxis,
int);
316 vtkSetStringMacro(Title);
318 vtkSetStringMacro(XTitle);
320 vtkSetStringMacro(YTitle);
328 {
return this->XAxis;}
330 {
return this->YAxis;}
340 vtkSetVector2Macro(XRange,
double);
341 vtkGetVectorMacro(XRange,
double,2);
342 vtkSetVector2Macro(YRange,
double);
343 vtkGetVectorMacro(YRange,
double,2);
344 void SetPlotRange(
double xmin,
double ymin,
double xmax,
double ymax)
345 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
354 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
355 vtkGetMacro(NumberOfXLabels,
int);
356 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
357 vtkGetMacro(NumberOfYLabels,
int);
358 void SetNumberOfLabels(
int num)
359 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
368 void SetAdjustXLabels(
int adjust);
369 vtkGetMacro( AdjustXLabels,
int );
370 void SetAdjustYLabels(
int adjust);
371 vtkGetMacro( AdjustYLabels,
int );
376 void SetXTitlePosition(
double position);
377 double GetXTitlePosition();
378 void SetYTitlePosition(
double position);
379 double GetYTitlePosition();
384 void SetNumberOfXMinorTicks(
int num);
385 int GetNumberOfXMinorTicks();
386 void SetNumberOfYMinorTicks(
int num);
387 int GetNumberOfYMinorTicks();
394 vtkSetMacro(Legend,
int);
395 vtkGetMacro(Legend,
int);
396 vtkBooleanMacro(Legend,
int);
402 vtkSetVector2Macro(TitlePosition,
double);
403 vtkGetVector2Macro(TitlePosition,
double);
409 vtkSetMacro(AdjustTitlePosition,
int);
410 vtkGetMacro(AdjustTitlePosition,
int);
411 vtkBooleanMacro(AdjustTitlePosition,
int);
422 AlignAxisLeft = 0x100,
423 AlignAxisRight = 0x200,
424 AlignAxisHCenter = 0x400,
425 AlignAxisTop = 0x1000,
426 AlignAxisBottom = 0x2000,
427 AlignAxisVCenter = 0x4000,
436 vtkSetMacro(AdjustTitlePositionMode,
int);
437 vtkGetMacro(AdjustTitlePositionMode,
int);
447 vtkSetVector2Macro(LegendPosition,
double);
448 vtkGetVector2Macro(LegendPosition,
double);
449 vtkSetVector2Macro(LegendPosition2,
double);
450 vtkGetVector2Macro(LegendPosition2,
double);
475 vtkSetMacro(Logx,
int);
476 vtkGetMacro(Logx,
int);
477 vtkBooleanMacro(Logx,
int);
483 virtual void SetLabelFormat (
const char* _arg);
484 const char* GetLabelFormat()
486 return this->GetXLabelFormat();
492 virtual void SetXLabelFormat (
const char* _arg);
498 virtual void SetYLabelFormat (
const char* _arg);
505 vtkSetClampMacro(Border,
int, 0, 50);
506 vtkGetMacro(Border,
int);
513 vtkGetMacro(PlotPoints,
int);
514 vtkSetMacro(PlotPoints,
int);
515 vtkBooleanMacro(PlotPoints,
int);
521 vtkGetMacro(PlotLines,
int);
522 vtkSetMacro(PlotLines,
int);
523 vtkBooleanMacro(PlotLines,
int);
530 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
531 vtkGetMacro(GlyphSize,
double);
536 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
542 void ViewportToPlotCoordinate(
vtkViewport *viewport);
543 vtkSetVector2Macro(PlotCoordinate,
double);
544 vtkGetVector2Macro(PlotCoordinate,
double);
548 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
555 void PlotToViewportCoordinate(
vtkViewport *viewport);
556 vtkSetVector2Macro(ViewportCoordinate,
double);
557 vtkGetVector2Macro(ViewportCoordinate,
double);
562 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
567 vtkSetMacro(ChartBox,
int);
568 vtkGetMacro(ChartBox,
int);
569 vtkBooleanMacro(ChartBox,
int);
575 vtkSetMacro(ChartBorder,
int);
576 vtkGetMacro(ChartBorder,
int);
577 vtkBooleanMacro(ChartBorder,
int);
585 vtkSetMacro(ShowReferenceXLine,
int);
586 vtkGetMacro(ShowReferenceXLine,
int);
587 vtkBooleanMacro(ShowReferenceXLine,
int);
592 vtkSetMacro(ReferenceXValue,
double);
593 vtkGetMacro(ReferenceXValue,
double);
598 vtkSetMacro(ShowReferenceYLine,
int);
599 vtkGetMacro(ShowReferenceYLine,
int);
600 vtkBooleanMacro(ShowReferenceYLine,
int);
605 vtkSetMacro(ReferenceYValue,
double);
606 vtkGetMacro(ReferenceYValue,
double);
614 void PrintAsCSV(ostream &os);
655 double XComputedRange[2];
656 double YComputedRange[2];
668 double TitlePosition[2];
681 double ViewportCoordinate[2];
682 double PlotCoordinate[2];
700 void InitializeEntries();
705 double LegendPosition[2];
706 double LegendPosition2[2];
736 void ComputeXRange(
double range[2],
double *lengths);
737 void ComputeYRange(
double range[2]);
738 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
740 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
741 double yRange[2],
double *norms,
742 int numDS,
int numDO);
743 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
744 void GenerateClipPlanes(
int *pos,
int *pos2);
745 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
746 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
747 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);
756 const char* arrayName,