wxPlot 1.8 Real time plot library for wxWidgets

Loading...
Searching...
No Matches
plotfigures.hpp
1#pragma once
2
3#include "2D/2Dfigure.hpp"
4
9 class PlotFigure {
10 private:
11
12 WXPLOT_FIGURE wxPlotFigure = WXPLOT_FIGURE_2D;
13
14 _2DFigure _2d;
15
16 public:
17
23 void setWxPlotFigureType(const WXPLOT_FIGURE wxPlotFigure, const WXPLOT_TYPE wxPlotType);
24
29 void setFontSize(const unsigned int fontSize);
30
35 void setTitle(const wxString& title);
36
41 void setXlabel(const wxString& xLabel);
42
47 void setYlabel(const wxString& yLabel);
48
53 void setTicks(const unsigned int ticks);
54
59 void gridOn(const bool useGrid);
60
79 void setPlotStartWidth(const wxCoord plotStartWidth);
80
99 void setPlotStartHeight(const wxCoord plotStartHeight);
100
119 void setPlotEndWidth(const wxCoord plotEndWidth);
120
139 void setPlotEndHeight(const wxCoord plotEndHeight);
140
145 void setData(const std::vector<std::vector<double>>& data2D);
146
151 void setData(const std::vector<double>& data1D);
152
157 void legendOn(const bool useLegend);
158
164 void setLegend(const std::vector<wxString>& legend, const PLACEMENT legendPosition = PLACEMENT_NORTH_EAST);
165
170 void setBinCount(const unsigned int binCount);
171
177 void setYlim(const double minY, const double maxY);
178
184 wxCoord getPlotStartWidth() const;
185
191 wxCoord getPlotEndWidth() const;
192
198 wxCoord getPlotStartHeight() const;
199
205 wxCoord getPlotEndHeight() const;
206
217 void drawFigure(wxDC& dc);
218
224 void drawGrid(wxDC& dc);
225
231 void drawTicks(wxDC& dc);
232
238 void drawLegend(wxDC& dc);
239};
_2DFigure
This is the 2D plot figure class. It contains plot figures such as propotional, histogram etc.
Definition 2Dfigure.hpp:11
PlotFigure
This is the plot figure class. It contains plot figures such as 2D, 3D and customs.
Definition plotfigures.hpp:9
PlotFigure::setPlotEndHeight
void setPlotEndHeight(const wxCoord plotEndHeight)
Set the right bottom corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is ...
Definition plotfigures.cpp:41
PlotFigure::setPlotEndWidth
void setPlotEndWidth(const wxCoord plotEndWidth)
Set the right upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is r...
Definition plotfigures.cpp:37
PlotFigure::getPlotEndHeight
wxCoord getPlotEndHeight() const
Get the recalculated end height Y-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:103
PlotFigure::drawLegend
void drawLegend(wxDC &dc)
This function will draw the legend. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:146
PlotFigure::setPlotStartHeight
void setPlotStartHeight(const wxCoord plotStartHeight)
Set the left upper corner in Y-axis. Inside this rectangle, the plot is drawn. NOTE: This value is re...
Definition plotfigures.cpp:33
PlotFigure::setXlabel
void setXlabel(const wxString &xLabel)
Set the name of the X-label.
Definition plotfigures.cpp:13
PlotFigure::setYlim
void setYlim(const double minY, const double maxY)
Set the plot zoom limit in Y-axis.
Definition plotfigures.cpp:65
PlotFigure::setYlabel
void setYlabel(const wxString &yLabel)
Set the name of the Y-label.
Definition plotfigures.cpp:17
PlotFigure::setTitle
void setTitle(const wxString &title)
Set the title of the plot.
Definition plotfigures.cpp:9
PlotFigure::setPlotStartWidth
void setPlotStartWidth(const wxCoord plotStartWidth)
Set the left upper corner in X-axis. Inside this rectangle, the plot is drawn. NOTE: This value is re...
Definition plotfigures.cpp:29
PlotFigure::drawGrid
void drawGrid(wxDC &dc)
This function will draw the grid. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:135
PlotFigure::drawTicks
void drawTicks(wxDC &dc)
This function will draw the ticks. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:124
PlotFigure::setBinCount
void setBinCount(const unsigned int binCount)
Set the bin count for e.g. histogram.
Definition plotfigures.cpp:69
PlotFigure::gridOn
void gridOn(const bool useGrid)
Enable grid on the figure.
Definition plotfigures.cpp:25
PlotFigure::getPlotStartHeight
wxCoord getPlotStartHeight() const
Get the recalculated start height Y-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:93
PlotFigure::setLegend
void setLegend(const std::vector< wxString > &legend, const PLACEMENT legendPosition=PLACEMENT_NORTH_EAST)
Set the labels and placement for the legend.
Definition plotfigures.cpp:57
PlotFigure::legendOn
void legendOn(const bool useLegend)
Activate the legend.
Definition plotfigures.cpp:53
PlotFigure::getPlotStartWidth
wxCoord getPlotStartWidth() const
Get the recalculated start width X-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:73
PlotFigure::setFontSize
void setFontSize(const unsigned int fontSize)
Set the size of the fonts.
Definition plotfigures.cpp:61
PlotFigure::setWxPlotFigureType
void setWxPlotFigureType(const WXPLOT_FIGURE wxPlotFigure, const WXPLOT_TYPE wxPlotType)
Set the plot type selection and plot figure selection.
Definition plotfigures.cpp:4
PlotFigure::drawFigure
void drawFigure(wxDC &dc)
This function will do the following:
Definition plotfigures.cpp:113
PlotFigure::getPlotEndWidth
wxCoord getPlotEndWidth() const
Get the recalculated end width X-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:83
PlotFigure::setData
void setData(const std::vector< std::vector< double > > &data2D)
Set 2D data.
Definition plotfigures.cpp:45
PlotFigure::setTicks
void setTicks(const unsigned int ticks)
Set the number of ticks at the figure in all axis.
Definition plotfigures.cpp:21