#include <GnuplotVisualization.h>
Public Member Functions | |
GnuplotVisualization () | |
void | initAnimatedBarChart (const std::vector< std::string > &pBarLabels, const std::string &pBarChartTitle, const std::string &pYLabel, const std::pair< float, float > &pYRange) |
void | sendBarChartToGnuplot (const bool pHighlightHighestValue) |
void | updateBarChartValues (const std::map< std::string, float > &pCurrentData) |
~GnuplotVisualization () | |
Private Attributes | |
std::vector< std::pair< float, std::pair< std::string, float > > > | mBarChartBuffer |
boost::shared_ptr< Gnuplot > | mGnuplotHandler |
std::pair< float, float > | mYRange |
Gnuplot visualizer class. Interface to various visualizations realized through gnuplot that can be filled with data from constellation models. Visualization comprises bar charts for probability tables.
Definition at line 44 of file GnuplotVisualization.h.
Visualization::GnuplotVisualization::GnuplotVisualization | ( | ) |
Constructor.
Definition at line 22 of file GnuplotVisualization.cpp.
Visualization::GnuplotVisualization::~GnuplotVisualization | ( | ) |
Destructor.
Definition at line 26 of file GnuplotVisualization.cpp.
void Visualization::GnuplotVisualization::initAnimatedBarChart | ( | const std::vector< std::string > & | pBarLabels, |
const std::string & | pBarChartTitle, | ||
const std::string & | pYLabel, | ||
const std::pair< float, float > & | pYRange | ||
) |
Create a gnuplot visualization of a bar chart that can be altered during its lifetime and set its properties.
pBarLabels | Identifiers of all bar that are to be visualized |
pBarChartTitle | Title of whole visualization. |
pYLabel | Label of y-axis of visualization. |
pYRange | Interval represented as pair<min, max> in which bar values are allowed to lie. |
Definition at line 30 of file GnuplotVisualization.cpp.
void Visualization::GnuplotVisualization::sendBarChartToGnuplot | ( | const bool | pHighlightHighestValue | ) |
Shows all values in gnuplot as bar chart that are currently in internal buffer of visualizer. Therefore translates content of buffer to gnuplot representation.
pHighlightHighestValue | Show highest value in bar chart in other color than the rest of the bar. |
Definition at line 109 of file GnuplotVisualization.cpp.
void Visualization::GnuplotVisualization::updateBarChartValues | ( | const std::map< std::string, float > & | pCurrentData | ) |
Alters the values of the bars in the buffer of bar chart visualizer object.
pCurrentData | Labels of bars for which values are to replaced with the data labels are associated with. |
Definition at line 79 of file GnuplotVisualization.cpp.
|
private |
Buffer keeping bar chart data in representation compatible to gnuplot. Every array element is a bar with (from left to right), its position on the x-axis, the name of the tic at this position and its hight (concerning y-axis).
Definition at line 93 of file GnuplotVisualization.h.
|
private |
Interface with which configurations or data is sent to gnuplot.
Definition at line 87 of file GnuplotVisualization.h.
|
private |
Range (pair<min,max>) in which all bar values to be visualized have to lie.
Definition at line 98 of file GnuplotVisualization.h.