|
wxPlot 1.8
Real time plot library for wxWidgets
|
This is the 2D plot figure class. It contains plot figures such as propotional, histogram etc. More...
#include <2Dfigure.hpp>
Public Member Functions | |
| void | setWxPlotType (const WXPLOT_TYPE wxPlotType) |
| Set the plot type selection. | |
| void | setFontSize (const unsigned int fontSize) |
| Set the size of the fonts. | |
| void | setTitle (const wxString &title) |
| Set the title of the plot. | |
| void | setXlabel (const wxString &xLabel) |
| Set the name of the X-label. | |
| void | setYlabel (const wxString &yLabel) |
| Set the name of the Y-label. | |
| void | setTicks (const unsigned int ticks) |
| Set the number of ticks at the figure in all axis. | |
| void | gridOn (const bool useGrid) |
| Enable grid on the figure. | |
| 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) | |
| void | setData (const std::vector< std::vector< double > > &data2D) |
| Set 2D data. | |
| void | setData (const std::vector< double > &data1D) |
| Set 1D data. | |
| void | legendOn (const bool useLegend) |
| Activate the legend. | |
| void | setLegend (const std::vector< wxString > &legend, const PLACEMENT legendPosition=PLACEMENT_NORTH_EAST) |
| Set the labels and placement for the legend. | |
| void | setBinCount (const unsigned int binCount) |
| Set the bin count for e.g. histogram. | |
| void | setYlim (const double minY, const double maxY) |
| Set the plot zoom limit in Y-axis. | |
| wxCoord | getPlotStartWidth () const |
| Get the recalculated start width X-axis value. This value is recalculated after the figure is drawn. | |
| wxCoord | getPlotEndWidth () const |
| Get the recalculated end width X-axis value. This value is recalculated after the figure is drawn. | |
| wxCoord | getPlotStartHeight () const |
| Get the recalculated start height Y-axis value. This value is recalculated after the figure is drawn. | |
| wxCoord | getPlotEndHeight () const |
| Get the recalculated end height Y-axis value. This value is recalculated after the figure is drawn. | |
| void | drawFigure (wxDC &dc) |
| This function will do the following: | |
| void | drawGrid (wxDC &dc) |
| This function will draw the grid. Call this function after you have drawn the plot type. | |
| void | drawTicks (wxDC &dc) |
| This function will draw the ticks. Call this function after you have drawn the plot type. | |
| void | drawLegend (wxDC &dc) |
| This function will draw the legend. Call this function after you have drawn the plot type. | |
This is the 2D plot figure class. It contains plot figures such as propotional, histogram etc.
| void _2DFigure::drawFigure | ( | wxDC & | dc | ) |
This function will do the following:
| dc | The wxDC object for drawing lines, polygons etc. |
| void _2DFigure::drawGrid | ( | wxDC & | dc | ) |
This function will draw the grid. Call this function after you have drawn the plot type.
| dc | The wxDC object for drawing lines, polygons etc. |
| void _2DFigure::drawLegend | ( | wxDC & | dc | ) |
This function will draw the legend. Call this function after you have drawn the plot type.
| dc | The wxDC object for drawing lines, polygons etc. |
| void _2DFigure::drawTicks | ( | wxDC & | dc | ) |
This function will draw the ticks. Call this function after you have drawn the plot type.
| dc | The wxDC object for drawing lines, polygons etc. |
| wxCoord _2DFigure::getPlotEndHeight | ( | ) | const |
Get the recalculated end height Y-axis value. This value is recalculated after the figure is drawn.
| wxCoord _2DFigure::getPlotEndWidth | ( | ) | const |
Get the recalculated end width X-axis value. This value is recalculated after the figure is drawn.
| wxCoord _2DFigure::getPlotStartHeight | ( | ) | const |
Get the recalculated start height Y-axis value. This value is recalculated after the figure is drawn.
| wxCoord _2DFigure::getPlotStartWidth | ( | ) | const |
Get the recalculated start width X-axis value. This value is recalculated after the figure is drawn.
| void _2DFigure::gridOn | ( | const bool | useGrid | ) |
Enable grid on the figure.
| useGrid | Set true for enabling grid. |
| void _2DFigure::legendOn | ( | const bool | useLegend | ) |
Activate the legend.
| useLegend | Set true to make a little box with labels appear. |
| void _2DFigure::setBinCount | ( | const unsigned int | binCount | ) |
Set the bin count for e.g. histogram.
| binCount | Bin count is total columns inside a e.g historam chart. |
| void _2DFigure::setData | ( | const std::vector< double > & | data1D | ) |
Set 1D data.
| data1D | 1D data in form of 1D vector. |
| void _2DFigure::setData | ( | const std::vector< std::vector< double > > & | data2D | ) |
Set 2D data.
| data2D | 2D data in form of 2D vector. |
| void _2DFigure::setFontSize | ( | const unsigned int | fontSize | ) |
Set the size of the fonts.
| fontSize | The size of the fonts. |
| void _2DFigure::setLegend | ( | const std::vector< wxString > & | legend, |
| const PLACEMENT | legendPosition = PLACEMENT_NORTH_EAST ) |
Set the labels and placement for the legend.
| legend | Vector of strings for the legend. |
| legendPosition | Position where the legend should be placed. |
| void _2DFigure::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)
| plotEndHeight | End height is at the end of Y-axis. |
| void _2DFigure::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)
| plotEndWidth | End width is at the end of X-axis. |
| void _2DFigure::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)
| plotStartHeight | Start height is at the start of Y-axis. |
| void _2DFigure::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)
| plotStartWidth | Start width is at the start of X-axis. |
| void _2DFigure::setTicks | ( | const unsigned int | ticks | ) |
Set the number of ticks at the figure in all axis.
| ticks | Number of ticks. |
| void _2DFigure::setTitle | ( | const wxString & | title | ) |
Set the title of the plot.
| title | Name of the title. |
| void _2DFigure::setWxPlotType | ( | const WXPLOT_TYPE | wxPlotType | ) |
Set the plot type selection.
| wxPlotType | Selection of plot type. |
| void _2DFigure::setXlabel | ( | const wxString & | xLabel | ) |
Set the name of the X-label.
| xLabel | Name of the X-label. |
| void _2DFigure::setYlabel | ( | const wxString & | yLabel | ) |
Set the name of the Y-label.
| yLabel | Name of the Y-label. |
| void _2DFigure::setYlim | ( | const double | minY, |
| const double | maxY ) |
Set the plot zoom limit in Y-axis.
| minY | Minimum limit in Y-axis. |
| maxY | Maximum limit in Y-axis. |