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
Members
wxPlotCurve::wxPlotCurve
wxPlotCurve::GetEndX
wxPlotCurve::GetEndY
wxPlotCurve::GetOffsetY
wxPlotCurve::GetY
wxPlotCurve::GetStartX
wxPlotCurve::GetStartY
wxPlotCurve::SetEndY
wxPlotCurve::SetOffsetY
wxPlotCurve::SetStartY
wxPlotCurve(int offsetY, double startY, double endY)
Constructor assigning start values. See below for interpretation.
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.
double GetEndY()
See SetStartY.
int GetOffsetY()
Returns the vertical offset.
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.
wxInt32 GetStartX()
Must be overridden. This function should return the index of the first value of this curve, typically zero.
double GetStartY()
See SetStartY.
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.
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.
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.