wxPlot 1.8
Real time plot library for wxWidgets
Loading...
Searching...
No Matches
wxplot.hpp
1#pragma once
2
3#include <string>
4#include <vector>
5#include "plots/plots.hpp"
6
11class wxPlot : public wxPanel {
12private:
13 Plots plots;
14public:
15
22 wxPlot(wxFrame* parent, const WXPLOT_FIGURE wxPlotFigure = WXPLOT_FIGURE_2D, const WXPLOT_TYPE wxPlotType = WXPLOT_TYPE_LINE);
23
28 void setFontSize(const unsigned int fontSize);
29
34 void setTitle(const wxString title);
35
40 void setXlabel(const wxString xLabel);
41
46 void setYlabel(const wxString yLabel);
47
52 void setTicks(const unsigned int ticks);
53
58 void gridOn(const bool useGrid);
59
78 void setPlotStartWidth(const wxCoord plotStartWidth);
79
98 void setPlotStartHeight(const wxCoord plotStartHeight);
99
118 void setPlotEndWidth(const wxCoord plotEndWidth);
119
138 void setPlotEndHeight(const wxCoord plotEndHeight);
139
144 void setData(const std::vector<std::vector<double>>& data2D);
145
150 void setData(const std::vector<double>& data1D);
151
156 void setRadius(const wxCoord radius);
157
162 void legendOn(const bool useLegend);
163
169 void setLegend(const std::vector<wxString>& legend, const PLACEMENT legendPosition = PLACEMENT_NORTH_EAST);
170
175 void fillCircles(const bool fillCircle);
176
181 void setBinCount(const unsigned int binCount);
182
188 void setYlim(const double minY, const double maxY);
189
205 void drawPlot(wxPaintEvent& event);
206};
Plot class for wxPlot. This class contains plot types and plot figures.
Definition plots.hpp:10
Main class for wxPlot. This is the only class the user going to work with.
Definition wxplot.hpp:11
wxPlot(wxFrame *parent, const WXPLOT_FIGURE wxPlotFigure=WXPLOT_FIGURE_2D, const WXPLOT_TYPE wxPlotType=WXPLOT_TYPE_LINE)
Constructor of wxPlot.
Definition wxplot.cpp:3
void setYlabel(const wxString yLabel)
Set the name of the Y-label.
Definition wxplot.cpp:23
void setTicks(const unsigned int ticks)
Set the number of ticks at the figure in all axis.
Definition wxplot.cpp:27
void setData(const std::vector< std::vector< double > > &data2D)
Set 2D data.
Definition wxplot.cpp:51
void drawPlot(wxPaintEvent &event)
Important event function for draw the whole plot. Add things here, that you want to appear inside the...
Definition wxplot.cpp:85
void legendOn(const bool useLegend)
Activate the legend.
Definition wxplot.cpp:63
void fillCircles(const bool fillCircle)
Fill circles if radius is applied if circiles are going to be filled with the same colour as they are...
Definition wxplot.cpp:71
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 wxplot.cpp:47
void setRadius(const wxCoord radius)
Set radius. Most used for circles e.g filling scatter plots.
Definition wxplot.cpp:59
void setYlim(const double minY, const double maxY)
Set the plot zoom limit in Y-axis.
Definition wxplot.cpp:80
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 wxplot.cpp:39
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 wxplot.cpp:43
void setTitle(const wxString title)
Set the title of the plot.
Definition wxplot.cpp:15
void setXlabel(const wxString xLabel)
Set the name of the X-label.
Definition wxplot.cpp:19
void gridOn(const bool useGrid)
Enable grid on the figure.
Definition wxplot.cpp:31
void setFontSize(const unsigned int fontSize)
Set the size of the fonts.
Definition wxplot.cpp:11
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 wxplot.cpp:35
void setLegend(const std::vector< wxString > &legend, const PLACEMENT legendPosition=PLACEMENT_NORTH_EAST)
Set the labels and placement for the legend.
Definition wxplot.cpp:67
void setBinCount(const unsigned int binCount)
Set the bin count for e.g. histogram.
Definition wxplot.cpp:75