## wxPlotCurve

The wxPlotCurve class represents a curve displayed in a wxPlotWindow. It is a virtual curve, i.e. is acts only as an interface, leaving it to the programmer to care for how the values pairs are matched. wxPlotWindow and wxPlotCurve are designed to display large amounts of data, i.e. most typically data measured by some sort of machine.

This class is abstract, i.e. you have to derive your own class and implement the pure virtual functions (GetStartX(), GetEndX() and GetY()).

Derived from

wxObject

Members

wxPlotCurve::wxPlotCurve
wxPlotCurve::GetEndX
wxPlotCurve::GetEndY
wxPlotCurve::GetOffsetY
wxPlotCurve::GetY
wxPlotCurve::GetStartX
wxPlotCurve::GetStartY
wxPlotCurve::SetEndY
wxPlotCurve::SetOffsetY
wxPlotCurve::SetStartY

### wxPlotCurve::wxPlotCurve

wxPlotCurve(int offsetY, double startY, double endY)

Constructor assigning start values. See below for interpretation.

### wxPlotCurve::GetEndX

wxInt32 GetEndX()

Must be overridden. This function should return the index of the last value of this curve, typically 99 if 100 values have been measured.

### wxPlotCurve::GetEndY

double GetEndY()

See SetStartY.

### wxPlotCurve::GetOffsetY

int GetOffsetY()

Returns the vertical offset.

### wxPlotCurve::GetY

double GetY(wxInt32 x)

Must be overridden. This function will return the actual Y value corresponding to the given X value. The x value is of an integer type because it is considered to be an index in row of measured values.

### wxPlotCurve::GetStartX

wxInt32 GetStartX()

Must be overridden. This function should return the index of the first value of this curve, typically zero.

### wxPlotCurve::GetStartY

double GetStartY()

See SetStartY.

### wxPlotCurve::SetEndY

void SetEndY(double endY)

The value returned by this function tells the plot window what the highest values in the curve will be so that a suitable scale can be found for the display. If the Y values in this curve are in the range of -1.5 to 0.5, this function should return 0.5 or maybe 1.0 for nicer aesthetics.

### wxPlotCurve::SetOffsetY

void SetOffsetY(int offsetY)

When displaying several curves in one window, it is often useful to assign different offsets to the curves. You should call wxPlotWindow::Move to set this value after you have added the curve to the window.

### wxPlotCurve::SetStartY

void SetStartY(double startY)

The value returned by this function tells the plot window what the lowest values in the curve will be so that a suitable scale can be found for the display. If the Y values in this curve are in the range of -1.5 to 0.5, this function should return -1.5 or maybe -2.0 for nicer aesthetics.