Abstract class for 2D plots.
More...
#include <vtkPlot.h>
|
virtual int | IsA (const char *type) |
|
vtkPlot * | NewInstance () const |
|
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
|
virtual bool | SelectPoints (const vtkVector2f &min, const vtkVector2f &max) |
|
virtual void | SetWidth (float width) |
|
virtual float | GetWidth () |
|
virtual void | SetLabel (const vtkStdString &label) |
|
virtual vtkStdString | GetLabel () |
|
virtual void | SetLabels (vtkStringArray *labels) |
|
virtual vtkStringArray * | GetLabels () |
|
virtual int | GetNumberOfLabels () |
|
vtkStdString | GetLabel (vtkIdType index) |
|
void | SetIndexedLabels (vtkStringArray *labels) |
|
virtual vtkStringArray * | GetIndexedLabels () |
|
vtkContextMapper2D * | GetData () |
|
virtual vtkTable * | GetInput () |
|
virtual void | SetInputArray (int index, const vtkStdString &name) |
|
virtual void | SetSelection (vtkIdTypeArray *id) |
|
virtual vtkIdTypeArray * | GetSelection () |
|
|
virtual bool | PaintLegend (vtkContext2D *painter, const vtkRectf &rect, int legendIndex) |
|
|
virtual void | SetTooltipLabelFormat (const vtkStdString &label) |
|
virtual vtkStdString | GetTooltipLabelFormat () |
|
|
virtual void | SetTooltipNotation (int notation) |
|
virtual int | GetTooltipNotation () |
|
|
virtual void | SetTooltipPrecision (int precision) |
|
virtual int | GetTooltipPrecision () |
|
|
virtual vtkStdString | GetTooltipLabel (const vtkVector2f &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) |
|
|
virtual vtkIdType | GetNearestPoint (const vtkVector2f &point, const vtkVector2f &tolerance, vtkVector2f *location) |
|
|
virtual bool | SelectPointsInPolygon (const vtkContextPolygon &polygon) |
|
|
virtual void | SetColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a) |
|
virtual void | SetColor (double r, double g, double b) |
|
virtual void | GetColor (double rgb[3]) |
|
void | GetColor (unsigned char rgb[3]) |
|
|
void | SetPen (vtkPen *pen) |
|
vtkPen * | GetPen () |
|
|
void | SetBrush (vtkBrush *brush) |
|
vtkBrush * | GetBrush () |
|
|
virtual bool | GetUseIndexForXSeries () |
|
|
virtual void | SetUseIndexForXSeries (bool) |
|
|
virtual void | SetInputData (vtkTable *table) |
|
virtual void | SetInputData (vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn) |
|
void | SetInputData (vtkTable *table, vtkIdType xColumn, vtkIdType yColumn) |
|
|
virtual vtkAxis * | GetXAxis () |
|
virtual void | SetXAxis (vtkAxis *axis) |
|
|
virtual vtkAxis * | GetYAxis () |
|
virtual void | SetYAxis (vtkAxis *axis) |
|
|
virtual void | GetBounds (double bounds[4]) |
|
|
virtual void | GetUnscaledInputBounds (double bounds[4]) |
|
|
virtual void | SetProperty (const vtkStdString &property, const vtkVariant &var) |
|
virtual vtkVariant | GetProperty (const vtkStdString &property) |
|
Abstract class for 2D plots.
The base class for all plot types used in vtkChart derived charts.
- See Also
- vtkPlotPoints vtkPlotLine vtkPlotBar vtkChart vtkChartXY
- Examples:
- vtkPlot (Examples)
- Tests:
- vtkPlot (Tests)
Definition at line 52 of file vtkPlot.h.
static int vtkPlot::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
virtual int vtkPlot::IsA |
( |
const char * |
type | ) |
|
|
virtual |
Reimplemented in vtkPlotPoints, vtkControlPointsItem, vtkPlotStacked, vtkCompositeControlPointsItem, vtkPlotBar, vtkPiecewiseControlPointsItem, vtkScalarsToColorsItem, vtkColorTransferControlPointsItem, vtkPlotParallelCoordinates, vtkPlotPie, vtkPlotHistogram2D, vtkPlotLine, vtkColorTransferFunctionItem, vtkLookupTableItem, vtkCompositeTransferFunctionItem, and vtkPiecewiseFunctionItem.
Reimplemented in vtkPlotPoints, vtkControlPointsItem, vtkPlotStacked, vtkCompositeControlPointsItem, vtkPlotBar, vtkPiecewiseControlPointsItem, vtkScalarsToColorsItem, vtkColorTransferControlPointsItem, vtkPlotParallelCoordinates, vtkPlotPie, vtkPlotHistogram2D, vtkPlotLine, vtkColorTransferFunctionItem, vtkLookupTableItem, vtkCompositeTransferFunctionItem, and vtkPiecewiseFunctionItem.
vtkPlot* vtkPlot::NewInstance |
( |
| ) |
const |
virtual void vtkPlot::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
|
virtual |
Reimplemented in vtkPlotPoints, vtkControlPointsItem, vtkPlotStacked, vtkCompositeControlPointsItem, vtkPlotBar, vtkPiecewiseControlPointsItem, vtkScalarsToColorsItem, vtkColorTransferControlPointsItem, vtkPlotParallelCoordinates, vtkPlotPie, vtkPlotHistogram2D, vtkPlotLine, vtkColorTransferFunctionItem, vtkLookupTableItem, vtkCompositeTransferFunctionItem, and vtkPiecewiseFunctionItem.
virtual bool vtkPlot::PaintLegend |
( |
vtkContext2D * |
painter, |
|
|
const vtkRectf & |
rect, |
|
|
int |
legendIndex |
|
) |
| |
|
virtual |
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line drawn. A rect is supplied with the lower left corner of the rect (elements 0 and 1) and with width x height (elements 2 and 3). The plot can choose how to fill the space supplied. The index is used by Plots that return more than one label.
Reimplemented in vtkPlotPoints, vtkPlotStacked, vtkPlotBar, vtkPlotParallelCoordinates, vtkPlotPie, and vtkPlotLine.
virtual void vtkPlot::SetTooltipLabelFormat |
( |
const vtkStdString & |
label | ) |
|
|
virtual |
Sets/gets a printf-style string to build custom tooltip labels from. An empty string generates the default tooltip labels. The following case-sensitive format tags (without quotes) are recognized: 'x' The X value of the plot element 'y' The Y value of the plot element 'i' The IndexedLabels entry for the plot element 'l' The value of the plot's GetLabel() function 's' (vtkPlotBar only) The Labels entry for the bar segment Any other characters or unrecognized format tags are printed in the tooltip label verbatim.
Sets/gets a printf-style string to build custom tooltip labels from. An empty string generates the default tooltip labels. The following case-sensitive format tags (without quotes) are recognized: 'x' The X value of the plot element 'y' The Y value of the plot element 'i' The IndexedLabels entry for the plot element 'l' The value of the plot's GetLabel() function 's' (vtkPlotBar only) The Labels entry for the bar segment Any other characters or unrecognized format tags are printed in the tooltip label verbatim.
virtual void vtkPlot::SetTooltipNotation |
( |
int |
notation | ) |
|
|
virtual |
Sets/gets the tooltip notation style.
virtual int vtkPlot::GetTooltipNotation |
( |
| ) |
|
|
virtual |
Sets/gets the tooltip notation style.
virtual void vtkPlot::SetTooltipPrecision |
( |
int |
precision | ) |
|
|
virtual |
Sets/gets the tooltip precision.
virtual int vtkPlot::GetTooltipPrecision |
( |
| ) |
|
|
virtual |
Sets/gets the tooltip precision.
virtual vtkIdType vtkPlot::GetNearestPoint |
( |
const vtkVector2f & |
point, |
|
|
const vtkVector2f & |
tolerance, |
|
|
vtkVector2f * |
location |
|
) |
| |
|
virtual |
virtual bool vtkPlot::SelectPoints |
( |
const vtkVector2f & |
min, |
|
|
const vtkVector2f & |
max |
|
) |
| |
|
virtual |
Select all points in the specified polygon.
Reimplemented in vtkPlotPoints.
virtual void vtkPlot::SetColor |
( |
unsigned char |
r, |
|
|
unsigned char |
g, |
|
|
unsigned char |
b, |
|
|
unsigned char |
a |
|
) |
| |
|
virtual |
virtual void vtkPlot::SetColor |
( |
double |
r, |
|
|
double |
g, |
|
|
double |
b |
|
) |
| |
|
virtual |
virtual void vtkPlot::GetColor |
( |
double |
rgb[3] | ) |
|
|
virtual |
void vtkPlot::GetColor |
( |
unsigned char |
rgb[3] | ) |
|
virtual void vtkPlot::SetWidth |
( |
float |
width | ) |
|
|
virtual |
Set the width of the line.
Reimplemented in vtkPlotBar.
virtual float vtkPlot::GetWidth |
( |
| ) |
|
|
virtual |
Get the width of the line.
Reimplemented in vtkPlotBar.
void vtkPlot::SetPen |
( |
vtkPen * |
pen | ) |
|
Set/get the vtkPen object that controls how this plot draws (out)lines.
vtkPen* vtkPlot::GetPen |
( |
| ) |
|
Set/get the vtkPen object that controls how this plot draws (out)lines.
void vtkPlot::SetBrush |
( |
vtkBrush * |
brush | ) |
|
Set/get the vtkBrush object that controls how this plot fills shapes.
vtkBrush* vtkPlot::GetBrush |
( |
| ) |
|
Set/get the vtkBrush object that controls how this plot fills shapes.
virtual void vtkPlot::SetLabel |
( |
const vtkStdString & |
label | ) |
|
|
virtual |
Set the label of this plot.
Get the label of this plot.
Set the plot labels, these are used for stacked chart variants, with the index referring to the stacking index.
Get the plot labels. If this array has a length greater than 1 the index refers to the stacked objects in the plot. See vtkPlotBar for example.
Reimplemented in vtkPlotBar, and vtkPlotStacked.
virtual int vtkPlot::GetNumberOfLabels |
( |
| ) |
|
|
virtual |
Get the number of labels associated with this plot.
Get the label at the specified index.
Set indexed labels for the plot. If set, this array can be used to provide custom labels for each point in a plot. This array should be the same length as the points array. Default is null (no indexed labels).
Get the indexed labels array.
vtkContextMapper2D* vtkPlot::GetData |
( |
| ) |
|
Get the data object that the plot will draw.
virtual bool vtkPlot::GetUseIndexForXSeries |
( |
| ) |
|
|
virtual |
Use the Y array index for the X value. If true any X column setting will be ignored, and the X values will simply be the index of the Y column.
virtual void vtkPlot::SetUseIndexForXSeries |
( |
bool |
| ) |
|
|
virtual |
Use the Y array index for the X value. If true any X column setting will be ignored, and the X values will simply be the index of the Y column.
virtual void vtkPlot::SetInputData |
( |
vtkTable * |
table | ) |
|
|
virtual |
This is a convenience function to set the input table and the x, y column for the plot.
virtual vtkTable* vtkPlot::GetInput |
( |
| ) |
|
|
virtual |
Get the input table used by the plot.
virtual void vtkPlot::SetInputArray |
( |
int |
index, |
|
|
const vtkStdString & |
name |
|
) |
| |
|
virtual |
Convenience function to set the input arrays. For most plots index 0 is the x axis, and index 1 is the y axis. The name is the name of the column in the vtkTable.
Reimplemented in vtkPlotBar, and vtkPlotStacked.
virtual vtkAxis* vtkPlot::GetXAxis |
( |
| ) |
|
|
virtual |
Get/set the X axis associated with this plot.
virtual void vtkPlot::SetXAxis |
( |
vtkAxis * |
axis | ) |
|
|
virtual |
Get/set the X axis associated with this plot.
virtual vtkAxis* vtkPlot::GetYAxis |
( |
| ) |
|
|
virtual |
Get/set the Y axis associated with this plot.
virtual void vtkPlot::SetYAxis |
( |
vtkAxis * |
axis | ) |
|
|
virtual |
Get/set the Y axis associated with this plot.
virtual void vtkPlot::GetBounds |
( |
double |
bounds[4] | ) |
|
|
inlinevirtual |
virtual void vtkPlot::GetUnscaledInputBounds |
( |
double |
bounds[4] | ) |
|
|
inlinevirtual |
Provide un-log-scaled bounds for the plot inputs. This function is analogous to GetBounds() with 2 exceptions: 1. It will never return log-scaled bounds even when the x- and/or y-axes are log-scaled. 2. It will always return the bounds along the input axes rather than the output chart coordinates. Thus GetXAxis() returns the axis associated with the first 2 bounds entries and GetYAxis() returns the axis associated with the next 2 bounds entries. For example, vtkPlotBar's GetBounds() method will swap axis bounds when its orientation is vertical while its GetUnscaledInputBounds() will not swap axis bounds. This method is provided so user interfaces can determine whether or not to allow log-scaling of a particular vtkAxis. Subclasses of vtkPlot are responsible for implementing this function to transform input plot data. The returned bounds are stored as (Xmin, Xmax, Ymin, Ymax).
Reimplemented in vtkPlotBar, vtkPlotPoints, and vtkPlotStacked.
Definition at line 249 of file vtkPlot.h.
A General setter/getter that should be overridden. It can silently drop options, case is important
A General setter/getter that should be overridden. It can silently drop options, case is important
Get the properly formatted number for the supplied position and axis.
This object stores the vtkPen that controls how the plot is drawn.
Definition at line 275 of file vtkPlot.h.
This object stores the vtkBrush that controls how the plot is drawn.
Definition at line 278 of file vtkPlot.h.
Plot labels, used by legend.
Definition at line 281 of file vtkPlot.h.
Holds Labels when they're auto-created
Definition at line 284 of file vtkPlot.h.
Holds Labels when they're auto-created
Definition at line 287 of file vtkPlot.h.
bool vtkPlot::UseIndexForXSeries |
|
protected |
Use the Y array index for the X value. If true any X column setting will be ignored, and the X values will simply be the index of the Y column.
Definition at line 292 of file vtkPlot.h.
This data member contains the data that will be plotted, it inherits from vtkAlgorithm.
Definition at line 296 of file vtkPlot.h.
Selected indices for the table the plot is rendering
Definition at line 299 of file vtkPlot.h.
The X axis associated with this plot.
Definition at line 302 of file vtkPlot.h.
The X axis associated with this plot.
Definition at line 305 of file vtkPlot.h.
A printf-style string to build custom tooltip labels from. See the accessor/mutator functions for full documentation.
Definition at line 309 of file vtkPlot.h.
The default printf-style string to build custom tooltip labels from. See the accessor/mutator functions for full documentation.
Definition at line 313 of file vtkPlot.h.
int vtkPlot::TooltipNotation |
|
protected |
int vtkPlot::TooltipPrecision |
|
protected |
The documentation for this class was generated from the following file: