A class providing graphs functionality for a 2D plot (either continuous or a set of points), from vectors of data.
More...
|
| | mpFXYVector (const wxString &name=wxEmptyString, int flags=mpALIGN_NE, bool viewAsBar=false, size_t yAxisIndex=0) |
| |
|
virtual | ~mpFXYVector () |
| | destrutor
|
| |
| void | SetData (const std::vector< double > &xs, const std::vector< double > &ys) |
| | Changes the internal data: the set of points to draw. More...
|
| |
| void | Clear () |
| | Clears all the data, leaving the layer empty. More...
|
| |
|
virtual int | GetSize () |
| | Return the number of points in the series We assume that size of m_xs equals size of m_ys.
|
| |
| bool | AddData (const double x, const double y, bool updatePlot) |
| | Add data to the internal vector. More...
|
| |
| void | SetReserve (int reserve) |
| | Set memory reserved for m_xs and m_ys Note : this does not modify the size of m_xs and m_ys, this is not a resize. More...
|
| |
|
int | GetReserve () const |
| | Get memory reserved for m_xs and m_ys.
|
| |
| | mpFXYVector (const wxString &name=wxEmptyString, int flags=mpALIGN_NE, bool viewAsBar=false, mpScaleY *yAxisUsed=NULL) |
| |
|
virtual | ~mpFXYVector () |
| | destrutor
|
| |
| void | SetData (const std::vector< double > &xs, const std::vector< double > &ys) |
| | Changes the internal data: the set of points to draw. More...
|
| |
| void | Clear () |
| | Clears all the data, leaving the layer empty. More...
|
| |
|
virtual int | GetSize () |
| | Return the number of points in the series We assume that size of m_xs equals size of m_ys.
|
| |
| bool | AddData (const double x, const double y, bool updatePlot) |
| | Add data to the internal vector. More...
|
| |
| void | SetReserve (int reserve) |
| | Set memory reserved for m_xs and m_ys Note : this does not modify the size of m_xs and m_ys, this is not a resize. More...
|
| |
|
int | GetReserve () const |
| | Get memory reserved for m_xs and m_ys.
|
| |
| | mpFXY (const wxString &name=wxEmptyString, int flags=mpALIGN_NE, bool viewAsBar=false, size_t yAxisIndex=0) |
| |
|
bool | DoGetNextXY (double *x, double *y) |
| | Get function value with log test.
|
| |
|
void | SetViewMode (bool asBar) |
| | If true, XY series is plotted as bar.
|
| |
|
int | GetBarWidth (void) const |
| | return the width of the bar
|
| |
|
bool | ViewAsBar (void) const |
| | return true if XY series is plotted with bar
|
| |
| | mpFXY (const wxString &name=wxEmptyString, int flags=mpALIGN_NE, bool viewAsBar=false, mpScaleY *yAxisUsed=NULL) |
| |
|
bool | DoGetNextXY (double *x, double *y) |
| | Get function value with log test.
|
| |
|
void | SetViewMode (bool asBar) |
| | If true, XY series is plotted as bar.
|
| |
|
int | GetBarWidth (void) const |
| | return the width of the bar
|
| |
|
bool | ViewAsBar (void) const |
| | return true if XY series is plotted with bar
|
| |
|
| mpFunction (mpLayerType layerType=mpLAYER_PLOT, const wxString &name=wxEmptyString, size_t yAxisIndex=0) |
| | Full constructor.
|
| |
| void | SetContinuity (bool continuity) |
| | Set the 'continuity' property of the layer. More...
|
| |
| bool | GetContinuity () const |
| | Gets the 'continuity' property of the layer. More...
|
| |
| void | SetStep (unsigned int step) |
| | Set step for plot. More...
|
| |
| unsigned int | GetStep () const |
| | Get step for plot. More...
|
| |
| void | SetSymbol (mpSymbol symbol) |
| | Set symbol. More...
|
| |
| mpSymbol | GetSymbol () const |
| | Get symbol. More...
|
| |
| void | SetSymbolSize (int size) |
| | Set symbol size. More...
|
| |
| int | GetSymbolSize () const |
| | Get symbol size. More...
|
| |
| virtual bool | DrawSymbol (wxDC &dc, wxCoord x, wxCoord y) |
| | Draw a symbol in place of point. More...
|
| |
|
size_t | GetYAxisIndex () const |
| | Get the index of the Y axis associated to the function.
|
| |
|
void | SetYAxisIndex (size_t index) |
| | Set the index of the Y axis associated to the function.
|
| |
|
| mpFunction (mpLayerType layerType=mpLAYER_PLOT, const wxString &name=wxEmptyString, mpScaleY *yAxisUsed=NULL) |
| | Full constructor.
|
| |
| void | SetContinuity (bool continuity) |
| | Set the 'continuity' property of the layer. More...
|
| |
| bool | GetContinuity () const |
| | Gets the 'continuity' property of the layer. More...
|
| |
| void | SetStep (unsigned int step) |
| | Set step for plot. More...
|
| |
| unsigned int | GetStep () const |
| | Get step for plot. More...
|
| |
| void | SetSymbol (mpSymbol symbol) |
| | Set symbol. More...
|
| |
| mpSymbol | GetSymbol () const |
| | Get symbol. More...
|
| |
| void | SetSymbolSize (int size) |
| | Set symbol size. More...
|
| |
| int | GetSymbolSize () const |
| | Get symbol size. More...
|
| |
| virtual bool | DrawSymbol (wxDC &dc, wxCoord x, wxCoord y) |
| | Draw a symbol in place of point. More...
|
| |
|
int | GetYAxisID () const |
| | Get the ID of the Y axis used by the function.
|
| |
|
void | SetYAxis (mpScaleY *yAxisUsed) |
| | Set the Y axis associated to the function If the function is already associated to another axis, we first update this axis.
|
| |
|
| mpLayer (mpLayerType layerType) |
| |
|
void | SetWindow (mpWindow &w) |
| | Set the wxWindow handle.
|
| |
| virtual bool | HasBBox () |
| | Check whether this layer has a bounding box. More...
|
| |
| mpLayerType | GetLayerType () const |
| | Get layer type: a Layer can be of different types: plot, lines, axis, info boxes, etc, this method returns the right value. More...
|
| |
| int | GetLayerSubType () const |
| | Get layer subtype: each layer type can have several flavors. More...
|
| |
| virtual bool | IsLayerType (mpLayerType typeOfInterest, int *subtype) |
| | Set the layer's subtype in caller variable, and return true if the layer is of type "typeOfInterest". More...
|
| |
| void | Plot (wxDC &dc, mpWindow &w) |
| | Plot given view of layer to the given device context. More...
|
| |
| void | SetName (const wxString &name) |
| | Set layer name. More...
|
| |
| const wxString & | GetName () const |
| | Get layer name. More...
|
| |
| void | SetFont (const wxFont &font) |
| | Set layer font. More...
|
| |
| const wxFont & | GetFont () const |
| | Get font set for this layer. More...
|
| |
| void | SetFontColour (const wxColour &colour) |
| | Set layer font foreground colour. More...
|
| |
| const wxColour & | GetFontColour () const |
| | Get font foreground colour set for this layer. More...
|
| |
| void | SetPen (const wxPen &pen) |
| | Set layer pen. More...
|
| |
| const wxPen & | GetPen () const |
| | Get pen set for this layer. More...
|
| |
| void | SetBrush (const wxBrush &brush) |
| | Set layer brush. More...
|
| |
| const wxBrush & | GetBrush () const |
| | Get brush set for this layer. More...
|
| |
| void | SetShowName (bool show) |
| | Set Name visibility. More...
|
| |
| bool | GetShowName () const |
| | Get Name visibility. More...
|
| |
| void | SetDrawOutsideMargins (bool drawModeOutside) |
| | Set Draw mode: inside or outside margins. More...
|
| |
| bool | GetDrawOutsideMargins () const |
| | Get Draw mode: inside or outside margins. More...
|
| |
| wxBitmap | GetColourSquare (int side=16) |
| | Get a small square bitmap filled with the colour of the pen used in the layer. More...
|
| |
| bool | IsVisible () const |
| | Checks whether the layer is visible or not. More...
|
| |
| virtual void | SetVisible (bool show) |
| | Sets layer visibility. More...
|
| |
| bool | IsTractable () const |
| | Checks whether the layer is tractable or not. More...
|
| |
| virtual void | SetTractable (bool track) |
| | Sets layer tractability. More...
|
| |
| void | SetAlign (int align) |
| | Set X/Y alignment. More...
|
| |
| int | GetAlign () const |
| | Get X/Y alignment. More...
|
| |
| void | SetCanDelete (bool canDelete) |
| | Set CanDelete for plot. More...
|
| |
| bool | GetCanDelete (void) const |
| | Get CanDelete for plot. More...
|
| |
| mpLayerZOrder | GetZIndex (void) const |
| | Get the ZIndex of the plot. More...
|
| |
|
| mpLayer (mpLayerType layerType) |
| |
|
void | SetWindow (mpWindow &w) |
| | Set the wxWindow handle.
|
| |
| virtual bool | HasBBox () |
| | Check whether this layer has a bounding box. More...
|
| |
| mpLayerType | GetLayerType () const |
| | Get layer type: a Layer can be of different types: plot, lines, axis, info boxes, etc, this method returns the right value. More...
|
| |
| int | GetLayerSubType () const |
| | Get layer subtype: each layer type can have several flavors. More...
|
| |
| virtual bool | IsLayerType (mpLayerType typeOfInterest, int *subtype) |
| | Set the layer's subtype in caller variable, and return true if the layer is of type "typeOfInterest". More...
|
| |
| void | Plot (wxDC &dc, mpWindow &w) |
| | Plot given view of layer to the given device context. More...
|
| |
| void | SetName (const wxString &name) |
| | Set layer name. More...
|
| |
| const wxString & | GetName () const |
| | Get layer name. More...
|
| |
| void | SetFont (const wxFont &font) |
| | Set layer font. More...
|
| |
| const wxFont & | GetFont () const |
| | Get font set for this layer. More...
|
| |
| void | SetFontColour (const wxColour &colour) |
| | Set layer font foreground colour. More...
|
| |
| const wxColour & | GetFontColour () const |
| | Get font foreground colour set for this layer. More...
|
| |
| void | SetPen (const wxPen &pen) |
| | Set layer pen. More...
|
| |
| const wxPen & | GetPen () const |
| | Get pen set for this layer. More...
|
| |
| void | SetBrush (const wxBrush &brush) |
| | Set layer brush. More...
|
| |
| const wxBrush & | GetBrush () const |
| | Get brush set for this layer. More...
|
| |
| void | SetShowName (bool show) |
| | Set Name visibility. More...
|
| |
| bool | GetShowName () const |
| | Get Name visibility. More...
|
| |
| void | SetDrawOutsideMargins (bool drawModeOutside) |
| | Set Draw mode: inside or outside margins. More...
|
| |
| bool | GetDrawOutsideMargins () const |
| | Get Draw mode: inside or outside margins. More...
|
| |
| wxBitmap | GetColourSquare (int side=16) |
| | Get a small square bitmap filled with the colour of the pen used in the layer. More...
|
| |
| bool | IsVisible () const |
| | Checks whether the layer is visible or not. More...
|
| |
| virtual void | SetVisible (bool show) |
| | Sets layer visibility. More...
|
| |
| bool | IsTractable () const |
| | Checks whether the layer is tractable or not. More...
|
| |
| virtual void | SetTractable (bool track) |
| | Sets layer tractability. More...
|
| |
| void | SetAlign (int align) |
| | Set X/Y alignment. More...
|
| |
| int | GetAlign () const |
| | Get X/Y alignment. More...
|
| |
| void | SetCanDelete (bool canDelete) |
| | Set CanDelete for plot. More...
|
| |
| bool | GetCanDelete (void) const |
| | Get CanDelete for plot. More...
|
| |
| mpLayerZOrder | GetZIndex (void) const |
| | Get the ZIndex of the plot. More...
|
| |
|
| void | Rewind () |
| | Rewind value enumeration with mpFXY::GetNextXY. More...
|
| |
| virtual bool | GetNextXY (double *x, double *y) |
| | Get locus value for next N. More...
|
| |
| void | DrawAddedPoint (double x, double y) |
| | Draw the point added if there is in bound. More...
|
| |
|
virtual double | GetMinX () |
| | Returns the actual minimum X data (loaded in SetData).
|
| |
|
virtual double | GetMinY () |
| | Returns the actual minimum Y data (loaded in SetData).
|
| |
|
virtual double | GetMaxX () |
| | Returns the actual maximum X data (loaded in SetData).
|
| |
|
virtual double | GetMaxY () |
| | Returns the actual maximum Y data (loaded in SetData).
|
| |
| void | Rewind () |
| | Rewind value enumeration with mpFXY::GetNextXY. More...
|
| |
| virtual bool | GetNextXY (double *x, double *y) |
| | Get locus value for next N. More...
|
| |
|
void | DrawAddedPoint (double x, double y) |
| | Draw the point added if there is in bound.
|
| |
|
virtual double | GetMinX () |
| | Returns the actual minimum X data (loaded in SetData).
|
| |
|
virtual double | GetMinY () |
| | Returns the actual minimum Y data (loaded in SetData).
|
| |
|
virtual double | GetMaxX () |
| | Returns the actual maximum X data (loaded in SetData).
|
| |
|
virtual double | GetMaxY () |
| | Returns the actual maximum Y data (loaded in SetData).
|
| |
| virtual void | DoPlot (wxDC &dc, mpWindow &w) |
| | Layer plot handler. More...
|
| |
| void | UpdateViewBoundary (wxCoord xnew, wxCoord ynew) |
| | Update label positioning data. More...
|
| |
|
| wxDECLARE_DYNAMIC_CLASS (mpFXY) |
| |
| virtual void | DoPlot (wxDC &dc, mpWindow &w) |
| | Layer plot handler. More...
|
| |
| void | UpdateViewBoundary (wxCoord xnew, wxCoord ynew) |
| | Update label positioning data. More...
|
| |
|
| wxDECLARE_DYNAMIC_CLASS (mpFXY) |
| |
|
| wxDECLARE_DYNAMIC_CLASS (mpFunction) |
| |
|
virtual bool | DoBeforePlot () |
| | Here we verify that we have an Y axis associated to the plot We can not plot if we don't have an Y axis.
|
| |
|
| wxDECLARE_DYNAMIC_CLASS (mpFunction) |
| |
|
void | UpdateContext (wxDC &dc) const |
| | Initialize the context.
|
| |
|
void | CheckLog (double *x, double *y, size_t id=0) |
| | Test if we are in log axis and if true return the log of the values.
|
| |
|
void | UpdateContext (wxDC &dc) const |
| | Initialize the context.
|
| |
| void | CheckLog (double *x, double *y, int yID) |
| | Test if we are in log axis and if true return the log of the values. More...
|
| |
A class providing graphs functionality for a 2D plot (either continuous or a set of points), from vectors of data.
This class can be used directly, the user does not need to derive any new class. Simply pass the data as two vectors with the same length containing the X and Y coordinates to the method SetData.
To generate a graph with a set of points, call
layerVar->SetContinuity(false)
or
layerVar->SetContinuity(true)
to render the sequence of coordinates as a continuous line.
(Added: Jose Luis Blanco, AGO-2007)