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
9class PlotFigure {
10private:
11
12 WXPLOT_FIGURE wxPlotFigure = WXPLOT_FIGURE_2D;
13
14 _2DFigure _2d;
15
16public:
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};
This is the 2D plot figure class. It contains plot figures such as propotional, histogram etc.
Definition 2Dfigure.hpp:11
This is the plot figure class. It contains plot figures such as 2D, 3D and customs.
Definition plotfigures.hpp:9
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
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
wxCoord getPlotEndHeight() const
Get the recalculated end height Y-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:103
void drawLegend(wxDC &dc)
This function will draw the legend. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:146
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
void setXlabel(const wxString &xLabel)
Set the name of the X-label.
Definition plotfigures.cpp:13
void setYlim(const double minY, const double maxY)
Set the plot zoom limit in Y-axis.
Definition plotfigures.cpp:65
void setYlabel(const wxString &yLabel)
Set the name of the Y-label.
Definition plotfigures.cpp:17
void setTitle(const wxString &title)
Set the title of the plot.
Definition plotfigures.cpp:9
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
void drawGrid(wxDC &dc)
This function will draw the grid. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:135
void drawTicks(wxDC &dc)
This function will draw the ticks. Call this function after you have drawn the plot type.
Definition plotfigures.cpp:124
void setBinCount(const unsigned int binCount)
Set the bin count for e.g. histogram.
Definition plotfigures.cpp:69
void gridOn(const bool useGrid)
Enable grid on the figure.
Definition plotfigures.cpp:25
wxCoord getPlotStartHeight() const
Get the recalculated start height Y-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:93
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
void legendOn(const bool useLegend)
Activate the legend.
Definition plotfigures.cpp:53
wxCoord getPlotStartWidth() const
Get the recalculated start width X-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:73
void setFontSize(const unsigned int fontSize)
Set the size of the fonts.
Definition plotfigures.cpp:61
void setWxPlotFigureType(const WXPLOT_FIGURE wxPlotFigure, const WXPLOT_TYPE wxPlotType)
Set the plot type selection and plot figure selection.
Definition plotfigures.cpp:4
void drawFigure(wxDC &dc)
This function will do the following:
Definition plotfigures.cpp:113
wxCoord getPlotEndWidth() const
Get the recalculated end width X-axis value. This value is recalculated after the figure is drawn.
Definition plotfigures.cpp:83
void setData(const std::vector< std::vector< double > > &data2D)
Set 2D data.
Definition plotfigures.cpp:45
void setTicks(const unsigned int ticks)
Set the number of ticks at the figure in all axis.
Definition plotfigures.cpp:21