wxPlot 1.8
Real time plot library for wxWidgets
Loading...
Searching...
No Matches
2Dtype.hpp
1#pragma once
2
3#include "line/line.hpp"
4#include "scatter/scatter.hpp"
5#include "spline/spline.hpp"
6#include "bar/bar.hpp"
7#include "../../plottools/plottools.hpp"
8
13class _2DType {
14
15private:
16
17 WXPLOT_TYPE wxPlotType = WXPLOT_TYPE_LINE;
18
19 double minX = 0, maxX = 0, minY = 0, maxY = 0;
20 std::vector<std::vector<double>> data2D;
21 std::vector<double> data1D;
22 bool is2Dused = false;
23 unsigned int binCount = 10;
24
25 Line line;
26 Scatter scatter;
27 Spline spline;
28 Bar bar;
29
30public:
31
36 void setWxPlotType(const WXPLOT_TYPE wxPlotType);
37
42 void setRadius(const wxCoord radius);
43
48 void fillCircles(const bool fillCircle);
49
54 void setData(const std::vector<std::vector<double>>& data2D);
55
60 void setData(const std::vector<double>& data1D);
61
80 void setPlotStartWidth(const wxCoord plotStartWidth);
81
100 void setPlotStartHeight(const wxCoord plotStartHeight);
101
120 void setPlotEndWidth(const wxCoord plotEndWidth);
121
140 void setPlotEndHeight(const wxCoord plotEndHeight);
141
146 void setBinCount(const unsigned int binCount);
147
153 void setYlim(const double minY, const double maxY);
154
159 void drawType(wxDC& dc);
160};
Here all the 2D plot types.
Definition 2Dtype.hpp:13
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 2Dtype.cpp:81
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 2Dtype.cpp:15
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 2Dtype.cpp:74
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 2Dtype.cpp:95
void setRadius(const wxCoord radius)
Set radius. Most used for circles e.g filling scatter plots.
Definition 2Dtype.cpp:7
void setWxPlotType(const WXPLOT_TYPE wxPlotType)
Set the plot type selection.
Definition 2Dtype.cpp:3
void setBinCount(const unsigned int binCount)
Set the bin count for e.g. histogram.
Definition 2Dtype.cpp:11
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 2Dtype.cpp:88
void drawType(wxDC &dc)
This function draw the plot e.g line, bar, histogram, spline, scatter etc. inside in this rectangle.
Definition 2Dtype.cpp:102
void setYlim(const double minY, const double maxY)
Set the plot zoom limit in Y-axis.
Definition 2Dtype.cpp:57
void setData(const std::vector< std::vector< double > > &data2D)
Set 2D data.
Definition 2Dtype.cpp:19
Bar class. Inheritance from class Line.
Definition bar.hpp:11
Line class. Does the most of the things in 2D.
Definition line.hpp:10
Scatter class. Inheritance from class Line.
Definition scatter.hpp:11
Spline class. Inheritance from class Line.
Definition spline.hpp:11