wxPlot 1.8
Real time plot library for wxWidgets
Loading...
Searching...
No Matches
Line Class Reference

Line class. Does the most of the things in 2D. More...

#include <line.hpp>

Inheritance diagram for Line:
Bar Scatter Spline

Public Member Functions

void setLimits (const double minX, const double maxX, const double minY, const double maxY)
 Set minimum and maximum limits of the data.
 
void setPlotStartWidth (const wxCoord plotStartWidth)
 Set the left upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)
 
void setPlotStartHeight (const wxCoord plotStartHeight)
 Set the left upper corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)
 
void setPlotEndWidth (const wxCoord plotEndWidth)
 Set the right upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)
 
void setPlotEndHeight (const wxCoord plotEndHeight)
 Set the right bottom corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)
 
virtual void draw (wxDC &dc, const std::vector< double > &xData, const std::vector< double > &yData, const unsigned int colourIndex)
 Draw the line plot inside the rectangle.
 

Protected Attributes

wxCoord plotEndWidth = 0
 Location of right upper corner in X-axis.
 
wxCoord plotEndHeight = 0
 Location of right bottom corner in Y-axis.
 
wxCoord plotStartWidth = 0
 Location of left upper corner in X-axis.
 
wxCoord plotStartHeight = 0
 Location of left upper corner in Y-axis.
 
double minX = 0
 Minimum value of data in X-axis.
 
double maxX = 0
 Maximum value of data in X-axis.
 
double minY = 0
 Minimum value of data in Y-axis.
 
double maxY = 0
 Maximum value of data in Y-axis.
 

Detailed Description

Line class. Does the most of the things in 2D.

Member Function Documentation

◆ draw()

void Line::draw ( wxDC & dc,
const std::vector< double > & xData,
const std::vector< double > & yData,
const unsigned int colourIndex )
virtual

Draw the line plot inside the rectangle.

Parameters
dcThe wxDC object for drawing lines, polygons etc.
xDataData in X-axis.
yDataData in Y-axis.
colourIndexSelection index of the colour.

Reimplemented in Scatter, and Spline.

◆ setLimits()

void Line::setLimits ( const double minX,
const double maxX,
const double minY,
const double maxY )

Set minimum and maximum limits of the data.

Parameters
minXMinimum limit in X-axis.
maxXMaximum limit in X-axis.
minYMinimum limit in Y-axis.
maxYMaximum limit in Y-axis.

◆ setPlotEndHeight()

void Line::setPlotEndHeight ( const wxCoord plotEndHeight)

Set the right bottom corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)

(plotStartWidth, plotEndHeight) --------------------------------------------— (plotEndWidth, plotEndHeight)

Parameters
plotEndHeightEnd height is at the end of Y-axis.

◆ setPlotEndWidth()

void Line::setPlotEndWidth ( const wxCoord plotEndWidth)

Set the right upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)

(plotStartWidth, plotEndHeight) --------------------------------------------— (plotEndWidth, plotEndHeight)

Parameters
plotEndWidthEnd width is at the end of X-axis.

◆ setPlotStartHeight()

void Line::setPlotStartHeight ( const wxCoord plotStartHeight)

Set the left upper corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)

(plotStartWidth, plotEndHeight) --------------------------------------------— (plotEndWidth, plotEndHeight)

Parameters
plotStartHeightStart height is at the start of Y-axis.

◆ setPlotStartWidth()

void Line::setPlotStartWidth ( const wxCoord plotStartWidth)

Set the left upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is recalculated since the plot figure is drawn! (plotStartWidth, plotStartHeight) --------------------------------------------— (plotEndWidth, plotStartHeight)

(plotStartWidth, plotEndHeight) --------------------------------------------— (plotEndWidth, plotEndHeight)

Parameters
plotStartWidthStart width is at the start of X-axis.

The documentation for this class was generated from the following files: