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
151 void RemoveAllInputs();
160 void SetPointComponent(
int i,
int comp);
161 int GetPointComponent(
int i);
175 vtkGetMacro(XValues,
int);
181 const char *GetXValuesAsString();
198 {
return this->DataObjectInputList;}
205 vtkGetMacro(DataObjectPlotMode,
int);
210 const char *GetDataObjectPlotModeAsString();
220 void SetDataObjectXComponent(
int i,
int comp);
221 int GetDataObjectXComponent(
int i);
231 void SetDataObjectYComponent(
int i,
int comp);
232 int GetDataObjectYComponent(
int i);
241 void SetPlotColor(
int i,
double r,
double g,
double b);
243 this->SetPlotColor(i, color[0], color[1], color[2]); };
244 double *GetPlotColor(
int i);
247 void SetPlotLabel(
int i,
const char *label);
248 const char *GetPlotLabel(
int i);
253 vtkGetMacro(PlotCurvePoints,
int);
254 vtkSetMacro(PlotCurvePoints,
int);
255 vtkBooleanMacro(PlotCurvePoints,
int);
257 vtkGetMacro(PlotCurveLines,
int);
258 vtkSetMacro(PlotCurveLines,
int);
259 vtkBooleanMacro(PlotCurveLines,
int);
261 void SetPlotLines(
int i,
int);
262 int GetPlotLines(
int i);
264 void SetPlotPoints(
int i,
int);
265 int GetPlotPoints(
int i);
271 vtkSetMacro(ExchangeAxes,
int);
272 vtkGetMacro(ExchangeAxes,
int);
273 vtkBooleanMacro(ExchangeAxes,
int);
281 vtkSetMacro(ReverseXAxis,
int);
282 vtkGetMacro(ReverseXAxis,
int);
283 vtkBooleanMacro(ReverseXAxis,
int);
291 vtkSetMacro(ReverseYAxis,
int);
292 vtkGetMacro(ReverseYAxis,
int);
293 vtkBooleanMacro(ReverseYAxis,
int);
308 vtkSetStringMacro(Title);
309 vtkGetStringMacro(Title);
310 vtkSetStringMacro(XTitle);
311 vtkGetStringMacro(XTitle);
312 vtkSetStringMacro(YTitle);
313 vtkGetStringMacro(YTitle);
320 {
return this->XAxis;}
322 {
return this->YAxis;}
332 vtkSetVector2Macro(XRange,
double);
333 vtkGetVectorMacro(XRange,
double,2);
334 vtkSetVector2Macro(YRange,
double);
335 vtkGetVectorMacro(YRange,
double,2);
337 {this->SetXRange(xmin,xmax); this->SetYRange(ymin,ymax);}
346 vtkSetClampMacro(NumberOfXLabels,
int, 0, 50);
347 vtkGetMacro(NumberOfXLabels,
int);
348 vtkSetClampMacro(NumberOfYLabels,
int, 0, 50);
349 vtkGetMacro(NumberOfYLabels,
int);
351 {this->SetNumberOfXLabels(num); this->SetNumberOfYLabels(num);}
360 void SetAdjustXLabels(
int adjust);
361 vtkGetMacro( AdjustXLabels,
int );
362 void SetAdjustYLabels(
int adjust);
363 vtkGetMacro( AdjustYLabels,
int );
368 void SetXTitlePosition(
double position);
369 double GetXTitlePosition();
370 void SetYTitlePosition(
double position);
371 double GetYTitlePosition();
376 void SetNumberOfXMinorTicks(
int num);
377 int GetNumberOfXMinorTicks();
378 void SetNumberOfYMinorTicks(
int num);
379 int GetNumberOfYMinorTicks();
386 vtkSetMacro(Legend,
int);
387 vtkGetMacro(Legend,
int);
388 vtkBooleanMacro(Legend,
int);
394 vtkSetVector2Macro(TitlePosition,
double);
395 vtkGetVector2Macro(TitlePosition,
double);
401 vtkSetMacro(AdjustTitlePosition,
int);
402 vtkGetMacro(AdjustTitlePosition,
int);
403 vtkBooleanMacro(AdjustTitlePosition,
int);
414 AlignAxisLeft = 0x100,
415 AlignAxisRight = 0x200,
416 AlignAxisHCenter = 0x400,
417 AlignAxisTop = 0x1000,
418 AlignAxisBottom = 0x2000,
419 AlignAxisVCenter = 0x4000,
428 vtkSetMacro(AdjustTitlePositionMode,
int);
429 vtkGetMacro(AdjustTitlePositionMode,
int);
439 vtkSetVector2Macro(LegendPosition,
double);
440 vtkGetVector2Macro(LegendPosition,
double);
441 vtkSetVector2Macro(LegendPosition2,
double);
442 vtkGetVector2Macro(LegendPosition2,
double);
467 vtkSetMacro(Logx,
int);
468 vtkGetMacro(Logx,
int);
469 vtkBooleanMacro(Logx,
int);
475 virtual void SetLabelFormat (
const char* _arg);
478 return this->GetXLabelFormat();
484 virtual void SetXLabelFormat (
const char* _arg);
485 vtkGetStringMacro(XLabelFormat);
490 virtual void SetYLabelFormat (
const char* _arg);
491 vtkGetStringMacro(YLabelFormat);
497 vtkSetClampMacro(Border,
int, 0, 50);
498 vtkGetMacro(Border,
int);
505 vtkGetMacro(PlotPoints,
int);
506 vtkSetMacro(PlotPoints,
int);
507 vtkBooleanMacro(PlotPoints,
int);
513 vtkGetMacro(PlotLines,
int);
514 vtkSetMacro(PlotLines,
int);
515 vtkBooleanMacro(PlotLines,
int);
522 vtkSetClampMacro(GlyphSize,
double, 0.0, 0.2);
523 vtkGetMacro(GlyphSize,
double);
528 void ViewportToPlotCoordinate(
vtkViewport *viewport,
double &u,
double &v);
534 void ViewportToPlotCoordinate(
vtkViewport *viewport);
535 vtkSetVector2Macro(PlotCoordinate,
double);
536 vtkGetVector2Macro(PlotCoordinate,
double);
540 void PlotToViewportCoordinate(
vtkViewport *viewport,
double &u,
double &v);
547 void PlotToViewportCoordinate(
vtkViewport *viewport);
548 vtkSetVector2Macro(ViewportCoordinate,
double);
549 vtkGetVector2Macro(ViewportCoordinate,
double);
554 int IsInPlot(
vtkViewport *viewport,
double u,
double v);
559 vtkSetMacro(ChartBox,
int);
560 vtkGetMacro(ChartBox,
int);
561 vtkBooleanMacro(ChartBox,
int);
567 vtkSetMacro(ChartBorder,
int);
568 vtkGetMacro(ChartBorder,
int);
569 vtkBooleanMacro(ChartBorder,
int);
577 vtkSetMacro(ShowReferenceXLine,
int);
578 vtkGetMacro(ShowReferenceXLine,
int);
579 vtkBooleanMacro(ShowReferenceXLine,
int);
584 vtkSetMacro(ReferenceXValue,
double);
585 vtkGetMacro(ReferenceXValue,
double);
590 vtkSetMacro(ShowReferenceYLine,
int);
591 vtkGetMacro(ShowReferenceYLine,
int);
592 vtkBooleanMacro(ShowReferenceYLine,
int);
597 vtkSetMacro(ReferenceYValue,
double);
598 vtkGetMacro(ReferenceYValue,
double);
606 void PrintAsCSV(ostream &os);
647 double XComputedRange[2];
648 double YComputedRange[2];
660 double TitlePosition[2];
673 double ViewportCoordinate[2];
674 double PlotCoordinate[2];
692 void InitializeEntries();
697 double LegendPosition[2];
698 double LegendPosition2[2];
728 void ComputeXRange(
double range[2],
double *lengths);
729 void ComputeYRange(
double range[2]);
730 void ComputeDORange(
double xrange[2],
double yrange[2],
double *lengths);
732 virtual void CreatePlotData(
int *pos,
int *pos2,
double xRange[2],
733 double yRange[2],
double *norms,
734 int numDS,
int numDO);
735 void PlaceAxes(
vtkViewport *viewport,
int *
size,
int pos[2],
int pos2[2]);
736 void GenerateClipPlanes(
int *pos,
int *pos2);
737 double ComputeGlyphScale(
int i,
int *pos,
int *pos2);
738 void ClipPlotData(
int *pos,
int *pos2,
vtkPolyData *pd);
739 double *TransformPoint(
int pos[2],
int pos2[2],
double x[3],
double xNew[3]);