Flair
Framework Libre Air
|
Class displaying a 2D plot on the ground station. More...
#include <DataPlot2D.h>
Public Member Functions | |
DataPlot2D (const LayoutPosition *position, std::string name, std::string x_name, float xmin, float xmax, std::string y_name, float ymin, float ymax) | |
Constructor. More... | |
~DataPlot2D () | |
Destructor. More... | |
void | AddCurve (const core::IODataElement *x_element, const core::IODataElement *y_element, Color_t color, std::string curve_name="") |
Add a curve from elements to the plot. More... | |
void | AddCurve (const core::IODataElement *x_element, const core::IODataElement *y_element, uint8_t r=255, uint8_t g=0, uint8_t b=0, std::string curve_name="") |
Add a curve from elements to the plot. More... | |
Class displaying a 2D plot on the ground station.
flair::gui::DataPlot2D::DataPlot2D | ( | const LayoutPosition * | position, |
std::string | name, | ||
std::string | x_name, | ||
float | xmin, | ||
float | xmax, | ||
std::string | y_name, | ||
float | ymin, | ||
float | ymax | ||
) |
Constructor.
Construct a 2D plot at given place position.
position | position to display the plot |
name | name |
x_name | name of x axis |
xmin | default xmin of the plot |
xmax | default xmax of the plot |
y_name | name of y axis |
ymin | default ymin of the plot |
ymax | default ymax of the plot |
flair::gui::DataPlot2D::~DataPlot2D | ( | ) |
Destructor.
void flair::gui::DataPlot2D::AddCurve | ( | const core::IODataElement * | x_element, |
const core::IODataElement * | y_element, | ||
Color_t | color, | ||
std::string | curve_name = "" |
||
) |
Add a curve from elements to the plot.
Curve's color can be selected by its name.
x_element | element to plot for x coordinate |
y_element | element to plot for y coordinate |
color | color of the curve |
curve_name | name of the curve ofr the legend |
void flair::gui::DataPlot2D::AddCurve | ( | const core::IODataElement * | x_element, |
const core::IODataElement * | y_element, | ||
uint8_t | r = 255 , |
||
uint8_t | g = 0 , |
||
uint8_t | b = 0 , |
||
std::string | curve_name = "" |
||
) |
Add a curve from elements to the plot.
Curve's color can be selected by its RGB components.
x_element | element to plot for x coordinate |
y_element | element to plot for y coordinate |
r | red component of the curve |
g | green component of the curve |
b | blue component of the curve |
curve_name | name of the curve ofr the legend |