source: flair-src/trunk/lib/FlairCore/src/DataPlot2D.h@ 13

Last change on this file since 13 was 2, checked in by Sanahuja Guillaume, 9 years ago

flaircore

File size: 2.8 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file DataPlot2D.h
7 * \brief Class displaying a 2D plot on the ground station
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/10/07
10 * \version 4.0
11 */
12
13#ifndef DATAPLOT2D_H
14#define DATAPLOT2D_H
15
16#include <DataPlot.h>
17#include <stdint.h>
18
19namespace flair
20{
21 namespace core
22 {
23 class IODataElement;
24 }
25}
26namespace flair
27{
28namespace gui
29{
30
31 class LayoutPosition;
32
33 /*! \class DataPlot2D
34 *
35 * \brief Class displaying a 2D plot on the ground station
36 *
37 */
38 class DataPlot2D: private DataPlot
39 {
40 public:
41 /*!
42 * \brief Constructor
43 *
44 * Construct a 2D plot at given place position.
45 *
46 * \param position position to display the plot
47 * \param name name
48 * \param x_name name of x axis
49 * \param xmin default xmin of the plot
50 * \param xmax default xmax of the plot
51 * \param y_name name of y axis
52 * \param ymin default ymin of the plot
53 * \param ymax default ymax of the plot
54 */
55 DataPlot2D(const LayoutPosition* position,std::string name,std::string x_name,float xmin,float xmax,std::string y_name,float ymin,float ymax);
56
57 /*!
58 * \brief Destructor
59 *
60 */
61 ~DataPlot2D();
62
63 /*!
64 * \brief Add a curve from elements to the plot.
65 *
66 * Curve's color can be selected by its name.
67 *
68 * \param x_element element to plot for x coordinate
69 * \param y_element element to plot for y coordinate
70 * \param color color of the curve
71 * \param curve_name name of the curve ofr the legend
72 */
73 void AddCurve(const core::IODataElement* x_element,const core::IODataElement* y_element,Color_t color,std::string curve_name="");
74
75 /*!
76 * \brief Add a curve from elements to the plot.
77 *
78 * Curve's color can be selected by its RGB components.
79 *
80 * \param x_element element to plot for x coordinate
81 * \param y_element element to plot for y coordinate
82 * \param r red component of the curve
83 * \param g green component of the curve
84 * \param b blue component of the curve
85 * \param curve_name name of the curve ofr the legend
86 */
87 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="");
88 };
89
90} // end namespace gui
91} // end namespace flair
92
93#endif // DATAPLOT2D_H
Note: See TracBrowser for help on using the repository browser.