|
wxPlot 1.8
Real time plot library for wxWidgets
|
Bar class. Inheritance from class Line. More...
#include <bar.hpp>
Public Member Functions | |
| void | draw (wxDC &dc, const double value, const unsigned int dataSize, const unsigned int colourIndex, const size_t i) |
| Draw the bar plot inside the rectangle. This is called by iteration. For example, this function is used inside a for-loop and each data, extracted from an array or vector. The extracted value is called "value" and the array or vector has the lenght "dataSize". | |
Public Member Functions inherited from Line | |
| 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. | |
Additional Inherited Members | |
Protected Attributes inherited from Line | |
| 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. | |
| void Bar::draw | ( | wxDC & | dc, |
| const double | value, | ||
| const unsigned int | dataSize, | ||
| const unsigned int | colourIndex, | ||
| const size_t | i ) |
Draw the bar plot inside the rectangle. This is called by iteration. For example, this function is used inside a for-loop and each data, extracted from an array or vector. The extracted value is called "value" and the array or vector has the lenght "dataSize".
| dc | The wxDC object for drawing lines, polygons etc. |
| value | The extracted value from data array or vector. |
| dataSize | The size of the data array or vector. |
| colourIndex | Selection index of the colour. |
| i | Index where the columns of the bar plot are going to be placed. |