13 #ifndef _MP_MATHPLOT_H_ 14 #define _MP_MATHPLOT_H_ 57 #ifdef mathplot_EXPORTS 58 #define WXDLLIMPEXP_MATHPLOT WXEXPORT 59 #define WXDLLIMPEXP_DATA_MATHPLOT( type ) WXEXPORT type 60 #else // not making DLL 61 #define WXDLLIMPEXP_MATHPLOT 62 #define WXDLLIMPEXP_DATA_MATHPLOT( type ) type 69 #include <wx/scrolwin.h> 71 #include <wx/dynarray.h> 73 #include <wx/dcmemory.h> 74 #include <wx/string.h> 87 #define DEBUG_NEW new (_NORMAL_BLOCK, __FILE__, __LINE__) 94 #define X_BORDER_SEPARATION 40 95 #define Y_BORDER_SEPARATION 60 170 virtual bool IsInfo()
const {
return false; };
175 virtual double GetMinX()
const {
return -1.0; }
180 virtual double GetMaxX()
const {
return 1.0; }
185 virtual double GetMinY()
const {
return -1.0; }
190 virtual double GetMaxY()
const {
return 1.0; }
233 virtual void Plot( wxDC& dc,
mpWindow& w ) = 0;
238 const wxString&
GetName()
const {
return m_name; }
243 const wxFont&
GetFont()
const {
return m_font; }
248 const wxPen&
GetPen()
const {
return m_pen; }
272 void SetFont( wxFont& font ) { m_font = font; }
277 void SetPen( wxPen pen ) { m_pen = pen; }
290 wxBitmap GetColourSquare(
int side = 16 )
const;
306 const wxBrush&
GetBrush()
const {
return m_brush; };
310 void SetBrush( wxBrush brush ) { m_brush = brush; };
323 DECLARE_DYNAMIC_CLASS(
mpLayer )
344 mpInfoLayer( wxRect rect,
const wxBrush* brush = wxTRANSPARENT_BRUSH );
353 virtual void UpdateInfo(
mpWindow& w, wxEvent& event );
357 virtual bool HasBBox()
const override {
return false; }
368 virtual bool IsInfo()
const override {
return true; }
373 virtual bool Inside( wxPoint& point );
377 virtual void Move( wxPoint
delta );
380 virtual void UpdateReference();
384 wxPoint GetPosition()
const;
388 wxSize GetSize()
const;
392 const wxRect& GetRectangle()
const {
return m_dim; };
414 mpInfoCoords( wxRect rect,
const wxBrush* brush = wxTRANSPARENT_BRUSH );
447 mpInfoLegend( wxRect rect,
const wxBrush* brush = wxTRANSPARENT_BRUSH );
475 #define mpALIGNMASK 0x03 477 #define mpALIGN_RIGHT 0x00 479 #define mpALIGN_CENTER 0x01 481 #define mpALIGN_LEFT 0x02 483 #define mpALIGN_TOP mpALIGN_RIGHT 485 #define mpALIGN_BOTTOM mpALIGN_LEFT 487 #define mpALIGN_BORDER_BOTTOM 0x04 489 #define mpALIGN_BORDER_TOP 0x05 491 #define mpX_NORMAL 0x00 493 #define mpX_TIME 0x01 495 #define mpX_HOURS 0x02 497 #define mpX_DATE 0x03 499 #define mpX_DATETIME 0x04 501 #define mpALIGN_BORDER_LEFT mpALIGN_BORDER_BOTTOM 503 #define mpALIGN_BORDER_RIGHT mpALIGN_BORDER_TOP 505 #define mpALIGN_NE 0x00 507 #define mpALIGN_NW 0x01 509 #define mpALIGN_SW 0x02 511 #define mpALIGN_SE 0x03 536 virtual double GetY(
double x )
const = 0;
547 DECLARE_DYNAMIC_CLASS(
mpFX )
568 virtual double GetX(
double y )
const = 0;
579 DECLARE_DYNAMIC_CLASS(
mpFY )
600 virtual void Rewind() = 0;
607 virtual bool GetNextXY(
double& x,
double& y ) = 0;
609 virtual size_t GetCount()
const = 0;
621 double s2x(
double plotCoordX )
const;
622 double s2y(
double plotCoordY )
const;
624 double x2s(
double x )
const;
625 double y2s(
double y )
const;
639 void UpdateViewBoundary( wxCoord xnew, wxCoord ynew );
641 DECLARE_DYNAMIC_CLASS(
mpFXY )
663 virtual double GetY(
double x )
const = 0;
699 virtual bool IsHorizontal()
const = 0;
701 bool HasBBox()
const override {
return false; }
714 void SetTicks(
bool enable ) { m_ticks = enable; };
748 m_minV = std::min( minV, m_minV );
749 m_maxV = std::max( maxV, m_maxV );
752 if( m_minV == m_maxV )
754 m_minV = m_minV - 1.0;
755 m_maxV = m_maxV + 1.0;
766 return std::max( std::abs( m_maxV ), std::abs( m_minV ) );
771 return m_absVisibleMaxV;
779 TickLabel(
double pos_ = 0.0,
const wxString& label_ = wxT(
"") ) :
780 pos( pos_ ), label( label_ ), pixelPos( 0 ), visible( true )
789 std::vector<TickLabel>&
TickLabels() {
return m_tickLabels; };
793 void updateTickLabels( wxDC& dc,
mpWindow& w );
794 void computeLabelExtents( wxDC& dc,
mpWindow& w );
802 return m_tickValues.size();
807 return m_tickLabels.size();
810 virtual const wxString
formatLabel(
double value,
int nDigits ) {
return wxEmptyString; }
815 return m_tickValues[n];
820 return m_tickLabels[n].pos;
825 return m_tickLabels[n].label;
852 bool ticks =
true,
unsigned int type =
mpX_NORMAL );
878 bool ticks =
true,
unsigned int type =
mpX_NORMAL );
907 bool ticks =
true,
unsigned int type =
mpX_NORMAL );
961 virtual bool HasBBox()
const override {
return false; }
981 m_masterScale = masterScale;
994 void computeSlaveTicks(
mpWindow& w );
1015 #define mpMOUSEMODE_DRAG 0 1017 #define mpMOUSEMODE_ZOOMBOX 1 1050 mpWindow( wxWindow* parent, wxWindowID
id,
1051 const wxPoint& pos = wxDefaultPosition,
1052 const wxSize& size = wxDefaultSize,
1068 bool AddLayer(
mpLayer* layer,
bool refreshDisplay =
true );
1078 bool DelLayer(
mpLayer* layer,
bool alsoDeleteObject =
false,
bool refreshDisplay =
true );
1084 void DelAllLayers(
bool alsoDeleteObject,
bool refreshDisplay =
true );
1092 mpLayer* GetLayer(
int position )
const;
1098 const mpLayer* GetLayerByName(
const wxString&
name )
const;
1101 return const_cast<mpLayer*>( static_cast<const mpWindow*>(
this )->GetLayerByName(
name ) );
1153 void SetScaleX(
double scaleX );
1169 void SetPosX(
double posX ) { m_posX = posX; UpdateAll(); }
1174 void SetPosY(
double posY ) { m_posY = posY; UpdateAll(); }
1180 void SetPos(
double posX,
double posY ) { m_posX = posX; m_posY = posY; UpdateAll(); }
1187 void SetScr(
int scrX,
int scrY ) { m_scrX = scrX; m_scrY = scrY; }
1192 inline double p2x( wxCoord pixelCoordX ) {
return m_posX + pixelCoordX / m_scaleX; }
1197 inline double p2y( wxCoord pixelCoordY ) {
return m_posY - pixelCoordY / m_scaleY; }
1202 inline wxCoord
x2p(
double x ) {
return (wxCoord) ( (x - m_posX) * m_scaleX ); }
1207 inline wxCoord
y2p(
double y ) {
return (wxCoord) ( (m_posY - y) * m_scaleY ); }
1227 void LockAspect(
bool enable =
true );
1239 void Fit()
override;
1247 void Fit(
double xMin,
double xMax,
double yMin,
double yMax,
1248 wxCoord* printSizeX = NULL, wxCoord* printSizeY = NULL );
1254 void ZoomIn(
const wxPoint& centerPoint = wxDefaultPosition );
1255 void ZoomIn(
const wxPoint& centerPoint,
double zoomFactor );
1261 void ZoomOut(
const wxPoint& centerPoint = wxDefaultPosition );
1262 void ZoomOut(
const wxPoint& centerPoint,
double zoomFactor );
1278 void ZoomRect( wxPoint p0, wxPoint p1 );
1289 unsigned int CountLayers()
const;
1329 void GetBoundingBox(
double* bbox )
const;
1333 void SetMPScrollbars(
bool status );
1344 bool SaveScreenshot(
const wxString& filename, wxBitmapType type = wxBITMAP_TYPE_BMP,
1345 wxSize imageSize = wxDefaultSize,
bool fit =
false );
1359 void SetMargins(
int top,
int right,
int bottom,
int left );
1399 void SetLayerVisible(
const wxString&
name,
bool viewable );
1404 bool IsLayerVisible(
const wxString&
name )
const;
1409 void SetLayerVisible(
const unsigned int position,
bool viewable );
1414 bool IsLayerVisible(
unsigned int position )
const;
1420 void SetColourTheme(
const wxColour& bgColour,
1421 const wxColour& drawColour,
1422 const wxColour& axesColour );
1431 m_enableLimitedView = aEnable;
1435 void OnPaint( wxPaintEvent& event );
1436 void OnSize( wxSizeEvent& event );
1439 void OnShowPopupMenu( wxMouseEvent& event );
1440 void OnMouseMiddleDown( wxMouseEvent& event );
1443 void OnCenter( wxCommandEvent& event );
1444 void OnFit( wxCommandEvent& event );
1445 void OnZoomIn( wxCommandEvent& event );
1446 void OnZoomOut( wxCommandEvent& event );
1447 void OnLockAspect( wxCommandEvent& event );
1448 void OnMouseWheel( wxMouseEvent& event );
1449 void OnMagnify( wxMouseEvent& event );
1450 void OnMouseMove( wxMouseEvent& event );
1451 void OnMouseLeftDown( wxMouseEvent& event );
1452 void OnMouseLeftRelease( wxMouseEvent& event );
1453 void OnScrollThumbTrack( wxScrollWinEvent& event );
1454 void OnScrollPageUp( wxScrollWinEvent& event );
1455 void OnScrollPageDown( wxScrollWinEvent& event );
1456 void OnScrollLineUp( wxScrollWinEvent& event );
1457 void OnScrollLineDown( wxScrollWinEvent& event );
1458 void OnScrollTop( wxScrollWinEvent& event );
1459 void OnScrollBottom( wxScrollWinEvent& event );
1461 void DoScrollCalc(
const int position,
const int orientation );
1463 void DoZoomInXCalc(
const int staticXpixel );
1464 void DoZoomInYCalc(
const int staticYpixel );
1465 void DoZoomOutXCalc(
const int staticXpixel );
1466 void DoZoomOutYCalc(
const int staticYpixel );
1470 return !( m_enableLimitedView
1471 && (desiredMax > m_maxX - m_marginRight / m_scaleX
1472 || desiredMin < m_minX - m_marginLeft / m_scaleX) );
1477 return !( m_enableLimitedView
1478 && (desiredMax > m_maxY + m_marginBottom / m_scaleY
1479 || desiredMin < m_minY + m_marginTop / m_scaleY) );
1482 void AdjustLimitedView();
1487 virtual bool UpdateBBox();
1492 virtual bool SetXView(
double pos,
double desiredMax,
double desiredMin );
1497 virtual bool SetYView(
double pos,
double desiredMax,
double desiredMin );
1543 DECLARE_EVENT_TABLE()
1583 virtual void SetData(
const std::vector<double>& xs,
const std::vector<double>& ys );
1613 bool GetNextXY(
double& x,
double& y )
override;
1620 double GetMinX()
const override {
return m_minX; }
1624 double GetMinY()
const override {
return m_minY; }
1628 double GetMaxX()
const override {
return m_maxX; }
1632 double GetMaxY()
const override {
return m_maxY; }
1648 mpFSemiLogXVector( wxString
name = wxEmptyString,
int flags =
mpALIGN_NE );
1650 virtual ~mpFSemiLogXVector() {}
1657 DECLARE_DYNAMIC_CLASS( mpFSemiLogXVector )
1677 mpText(
const wxString&
name = wxT(
"Title"),
int offsetx = 5,
int offsety = 50 );
1684 virtual bool HasBBox()
const override {
return false; }
1690 DECLARE_DYNAMIC_CLASS(
mpText )
1705 mpPrintout(
mpWindow* drawWindow,
const wxChar* title = _T(
"wxMathPlot print output") );
1709 bool OnPrintPage(
int page )
override;
1710 bool HasPage(
int page )
override;
1736 m_reference_phi( 0 ),
1755 phi = m_reference_phi;
1764 m_reference_phi = phi;
1769 virtual bool HasBBox()
const override {
return m_trans_shape_xs.size()!=0; }
1773 virtual double GetMinX()
const override {
return m_bbox_min_x; }
1777 virtual double GetMaxX()
const override {
return m_bbox_max_x; }
1781 virtual double GetMinY()
const override {
return m_bbox_min_y; }
1785 virtual double GetMaxY()
const override {
return m_bbox_max_y; }
1804 void TranslatePoint(
double x,
double y,
double& out_x,
double& out_y );
1825 void ShapeUpdated();
1852 double quantiles = 2,
1854 const wxString& layerName = wxT(
"") ) :
1858 m_quantiles( quantiles ),
1859 m_segments( segments )
1861 m_continuous =
true;
1913 void RecalculateShape();
1930 m_continuous =
true;
1941 void setPoints(
const std::vector<double>& points_xs,
1942 const std::vector<double>& points_ys,
1943 bool closedShape =
true );
1963 m_min_y = m_max_y = 0;
1964 m_scaledBitmap_offset_x = 0;
1965 m_scaledBitmap_offset_y = 0;
1974 void GetBitmapCopy( wxImage& outBmp )
const;
1983 void SetBitmap(
const wxImage& inBmp,
double x,
double y,
double lx,
double ly );
1985 virtual bool HasBBox()
const override {
return true; }
1989 virtual double GetMinX()
const override {
return m_min_x; }
1993 virtual double GetMaxX()
const override {
return m_max_x; }
1997 virtual double GetMinY()
const override {
return m_min_y; }
2001 virtual double GetMaxY()
const override {
return m_max_y; }
2028 #endif // _MP_MATHPLOT_H_
virtual bool HasBBox() const
Check whether this layer has a bounding box.
bool GetMPScrollbars() const
Get scrollbars status.
void ShowName(bool show)
Shows or hides the text label with the name of the layer (default is visible).
class WXDLLIMPEXP_MATHPLOT mpWindow
wxMenu * GetPopupMenu()
Get reference to context menu of the plot canvas.
virtual void recalculateTicks(wxDC &dc, mpWindow &w)
void SetMarginBottom(int bottom)
Set the bottom margin.
int GetMarginBottom() const
virtual double GetMaxY() const override
Get inclusive top border of bounding box.
mpLayer * GetLayerByName(const wxString &name)
void SetNameAlign(int align)
virtual ~mpMovableObject()
const wxString & GetName() const
Get layer name.
void SetMarginLeft(int left)
Set the left margin.
void EnableMouseWheelPan(bool enabled)
Enable/disable trackpad friendly panning (2-axis scroll wheel)
double GetPosY(void) const
virtual bool IsHorizontal() const override
void SetCovarianceMatrix(double cov_00, double cov_01, double cov_11)
Changes the covariance matrix:
virtual double getLabelPos(int n) const
class WXDLLIMPEXP_MATHPLOT mpFXYVector
void GetDataRange(double &minV, double &maxV) const
double GetScaleX(void) const
TickLabel(double pos_=0.0, const wxString &label_=wxT(""))
double p2x(wxCoord pixelCoordX)
Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates,...
double GetMinX() const override
Returns the actual minimum X data (loaded in SetData).
std::vector< double > m_trans_shape_ys
virtual double GetMaxY() const
Get inclusive top border of bounding box.
virtual bool HasBBox() const override
mpText should not be used for scaling decisions.
This virtual class represents objects that can be moved to an arbitrary 2D location+rotation.
const wxFont & GetFont() const
Get font set for this layer.
virtual double TransformFromPlot(double xplot) const
Abstract base class providing plot and labeling functionality for functions F:X->Y.
std::vector< TickLabel > & TickLabels()
double GetMaxY() const override
Returns the actual maximum Y data (loaded in SetData).
int GetXScreen(void) const
bool m_enableMouseNavigation
double GetScaleY(void) const
virtual double GetMinX() const override
Get inclusive left border of bounding box.
int m_segments
The number of line segments that build up the ellipse.
void SetName(wxString name)
Set layer name.
virtual bool HasBBox() const override
mpInfoLayer has not bounding box.
void SetDataRange(double minV, double maxV)
std::vector< TickLabel > m_tickLabels
virtual bool IsInfo() const override
Specifies that this is an Info box layer.
virtual double GetMaxY() const override
Get inclusive top border of bounding box.
Abstract base class providing plot and labeling functionality for functions F:Y->X.
void SetMasterScale(mpScaleY *masterScale)
const wxColour & GetAxesColour()
Get axes draw colour.
void SetQuantiles(double q)
Set how many "quantiles" to draw, that is, the confidence interval of the ellipse (see above).
unsigned int CountAllLayers() const
Counts the number of plot layers, whether or not they have a bounding box.
bool m_enableMouseWheelPan
bool HasBBox() const override
Check whether this layer has a bounding box.
#define mpALIGN_RIGHT
Aligns label to the right.
double p2y(wxCoord pixelCoordY)
Converts mpWindow (screen) pixel coordinates into graph (floating point) coordinates,...
void SetContinuity(bool continuity)
Set the 'continuity' property of the layer (true:draws a continuous line, false:draws separate points...
A class providing graphs functionality for a 2D plot (either continuous or a set of points),...
virtual void Plot(wxDC &dc, mpWindow &w) override
Plot method.
void SetAlign(int align)
Set label axis alignment.
double AbsVisibleMaxValue() const
void SetScaleY(double scaleY)
Set current view's Y scale and refresh display.
std::vector< double > m_ys
size_t m_index
The internal counter for the "GetNextXY" interface.
void SetMarginTop(int top)
Set the top margin.
void SetPen(wxPen pen)
Set layer pen.
const wxBrush & GetBrush() const
Get brush set for this layer.
double GetPosX(void) const
bool GetTicks() const
Get X axis ticks or grid.
bool GetTicks() const
Get Y axis ticks or grid.
void EnableDoubleBuffer(bool enabled)
Enable/disable the double-buffering of the window, eliminating the flicker (default=disabled).
An arbitrary polygon, descendant of mpMovableObject.
double GetQuantiles() const
std::deque< mpLayer * > wxLayerList
Define the type for the list of layers inside mpWindow.
Abstract base class providing plot and labeling functionality for a locus plot F:N->X,...
virtual double GetMaxX() const
Get inclusive right border of bounding box.
void ExtendDataRange(double minV, double maxV)
virtual bool HasBBox() const override
Check whether this layer has a bounding box.
virtual double TransformToPlot(double x) const
mpCovarianceEllipse(double cov_00=1, double cov_11=1, double cov_01=0, double quantiles=2, int segments=32, const wxString &layerName=wxT(""))
Default constructor.
virtual double GetMinX() const override
Get inclusive left border of bounding box.
void GetCovarianceMatrix(double &cov_00, double &cov_01, double &cov_11) const
Returns the elements of the current covariance matrix:
virtual ~mpCovarianceEllipse()
int GetMarginRight() const
virtual double GetMaxX() const override
Get inclusive right border of bounding box.
Implements an overlay box which shows the mouse coordinates in plot units.
wxCoord y2p(double y)
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates,...
#define mpX_NORMAL
Set label for X axis in normal mode.
void SetPosX(double posX)
Set current view's X position and refresh display.
void GetCoordinateBase(double &x, double &y, double &phi) const
Get the current coordinate transformation.
mpBitmapLayer()
Default constructor.
void SetMarginRight(int right)
Set the right margin.
void computeLabelExtents(wxDC &dc, mpWindow &w)
void SetPosY(double posY)
Set current view's Y position and refresh display.
#define WXDLLIMPEXP_MATHPLOT
wxMathPlot is a framework for mathematical graph plotting in wxWindows.
This virtual class represents objects that can be moved to an arbitrary 2D location+rotation.
Plot layer implementing a x-scale ruler.
double GetYscl() const
Get current view's Y scale.
void SetFont(wxFont &font)
Set layer font.
void SetVisible(bool show)
Sets layer visibility.
virtual void UpdateInfo(mpWindow &w, wxEvent &event)
Updates the content of the info box.
double GetDesiredXmax() const
Returns the right-border layer coordinate that the user wants the mpWindow to show (it may be not exa...
void SetBrush(wxBrush brush)
Set layer brush.
Base class to create small rectangular info boxes mpInfoLayer is the base class to create a small rec...
virtual double GetMinX() const
Get inclusive left border of bounding box.
int GetScrX(void) const
Get current view's X dimension in device context units.
Plot layer implementing a y-scale ruler.
bool IsVisible() const
Checks whether the layer is visible or not.
virtual double GetMinY() const
Get inclusive bottom border of bounding box.
class WXDLLIMPEXP_MATHPLOT mpScaleY
class WXDLLIMPEXP_MATHPLOT mpLayer
#define mpALIGN_TOP
Aligns label to the top.
bool CheckYLimits(double &desiredMax, double &desiredMin) const
Printout class used by mpWindow to draw in the objects to be printed.
void SetTicks(bool enable)
Set X axis ticks or grid.
mpInfoLayer * m_movingInfoLayer
#define mpALIGN_NE
Aligns label to north-east.
void SetAlign(int align)
Set label axis alignment.
double GetXpos() const
Get current view's X position.
void EnableMousePanZoom(bool enabled)
Enable/disable the feature of pan/zoom with the mouse (default=enabled)
bool IsAspectLocked() const
Checks whether the X/Y scale aspect is locked.
virtual void getVisibleDataRange(mpWindow &w, double &minV, double &maxV)
void SetDrawOutsideMargins(bool drawModeOutside)
Set Draw mode: inside or outside margins.
double GetMaxX() const override
Returns the actual maximum X data (loaded in SetData).
virtual double GetMinY() const override
Get inclusive bottom border of bounding box.
bool GetContinuity() const
Gets the 'continuity' property of the layer.
virtual double getTickPos(int n) const
bool m_drawOutsideMargins
double GetXscl() const
Get current view's X scale.
void SetAlign(int align)
Set Y axis alignment.
double GetDesiredXmin() const
Returns the left-border layer coordinate that the user wants the mpWindow to show (it may be not exac...
bool GetDrawOutsideMargins()
Get Draw mode: inside or outside margins.
virtual bool GetNextXY(double &x, double &y)=0
Get locus value for next N.
wxImage m_bitmap
The internal copy of the Bitmap:
virtual wxString getLabel(int n) const
void SetAlign(int align)
Set X axis alignment.
enum __mp_Layer_Type mpLayerType
wxCoord x2p(double x)
Converts graph (floating point) coordinates into mpWindow (screen) pixel coordinates,...
class WXDLLIMPEXP_MATHPLOT mpFXY
virtual void formatLabels()
A 2D ellipse, described by a 2x2 covariance matrix.
class WXDLLIMPEXP_MATHPLOT mpPrintout
void SetDrawState(bool drawState)
virtual size_t GetCount() const =0
wxCoord m_scaledBitmap_offset_y
void SetCoordinateBase(double x, double y, double phi=0)
Set the coordinate transformation (phi in radians, 0 means no rotation).
void SetScr(int scrX, int scrY)
Set current view's dimensions in device context units.
mpMovableObject()
Default constructor (sets location and rotation to (0,0,0))
class WXDLLIMPEXP_MATHPLOT mpFX
double GetDesiredYmin() const
Returns the bottom-border layer coordinate that the user wants the mpWindow to show (it may be not ex...
void SetPos(double posX, double posY)
Set current view's X and Y position and refresh display.
virtual void Plot(wxDC &dc, mpWindow &w)=0
Plot given view of layer to the given device context.
std::vector< double > m_shape_ys
void LimitView(bool aEnable)
Limit zooming & panning to the area used by the plots.
Plot layer implementing a text string.
Canvas for plotting mpLayer implementations.
virtual void Rewind()=0
Rewind value enumeration with mpFXY::GetNextXY.
void SetTicks(bool ticks)
Set Y axis ticks or grid.
virtual const wxString formatLabel(double value, int nDigits)
int GetMarginLeft() const
#define mpALIGN_CENTER
Aligns label to the center.
mpPolygon(const wxString &layerName=wxT(""))
Default constructor.
double GetMinY() const override
Returns the actual minimum Y data (loaded in SetData).
virtual double GetMaxX() const override
Get inclusive right border of bounding box.
bool CheckXLimits(double &desiredMax, double &desiredMin) const
Implements the legend to be added to the plot This layer allows you to add a legend to describe the p...
double GetDesiredYmax() const
Returns the top layer-border coordinate that the user wants the mpWindow to show (it may be not exact...
virtual int labelCount() const
bool m_enableDoubleBuffer
static double zoomIncrementalFactor
This value sets the zoom steps whenever the user clicks "Zoom in/out" or performs zoom with the mouse...
double AbsMaxValue() const
std::vector< double > m_tickValues
const wxPen & GetPen() const
Get pen set for this layer.
virtual double GetMinY() const override
Get inclusive bottom border of bounding box.
class WXDLLIMPEXP_MATHPLOT mpScaleX
class WXDLLIMPEXP_MATHPLOT mpFY
virtual bool IsHorizontal() const override
class WXDLLIMPEXP_MATHPLOT mpText
virtual bool IsInfo() const
Check whether the layer is an info box.
Abstract base class providing plot and labeling functionality for functions F:Y->X.
void SetSegments(int segments)
virtual bool HasBBox() const override
Check whether this layer has a bounding box.
int GetYScreen(void) const
double GetYpos() const
Get current view's Y position.
mpLayerType GetLayerType() const
Get layer type: a Layer can be of different types: plot lines, axis, info boxes, etc,...
virtual bool HasBBox() const override
Check whether this layer has a bounding box.
int GetScrY(void) const
Get current view's Y dimension in device context units.