namespace_Plot2D::Plot2D Class Reference

#include <Plot2D.h>


Detailed Description

A 2D plotting class.

Definition at line 78 of file Plot2D.h.


Public Member Functions

 Plot2D ()
 The default constructor (no data allocated yet).
virtual ~Plot2D ()
 The destructor.
void SetTitle (const std::string title)
 Set the figure title.
bool SetNrSeries (const int nrSeries)
 Set the total number of series to plot.
bool SetPlotSize (const int width_cm, const int height_cm)
 Set the plot size [cm].
bool Set_X_Label (const std::string label)
 Set the x axis label.
bool Set_X_Axis_isGridOn (const bool isGridOn)
 Set the x axis grid lines on/off.
bool Set_X_Axis_LowerLimit (const double value)
 Set the x axis lower limit. Otherwise it will be computed automatically based on the first series used.
bool Set_X_Axis_UpperLimit (const double value)
 Set the x axis upper limit. Otherwise it will be computed automatically based on the first series used.
bool Set_X_Axis_TickStart (const double value)
 Set the x axis tick start. Otherwise it will be computed automatically based on the first series used.
bool Set_X_Axis_TickSize (const double value)
 Set the x axis tick size. Otherwise it will be computed automatically based on the first series used.
bool Set_X_Axis_TickEnd (const double value)
 Set the x axis tick end. Otherwise it will be computed automatically based on the first series used.
bool Set_Y_Label (const std::string label)
 Set the y axis label.
bool Set_Y_Axis_isGridOn (const bool isGridOn)
 Set the y axis grid lines on/off.
bool Set_Y_Axis_LowerLimit (const double value)
 Set the y axis lower limit. Otherwise it will be computed automatically based on the first series used.
bool Set_Y_Axis_UpperLimit (const double value)
 Set the y axis upper limit. Otherwise it will be computed automatically based on the first series used.
bool Set_Y_Axis_TickStart (const double value)
 Set the y axis tick start. Otherwise it will be computed automatically based on the first series used.
bool Set_Y_Axis_TickSize (const double value)
 Set the y axis tick size. Otherwise it will be computed automatically based on the first series used.
bool Set_Y_Axis_TickEnd (const double value)
 Set the y axis tick end. Otherwise it will be computed automatically based on the first series used.
bool SetRightYLabel (const std::string label, double y_label_right_scale_factor, double y_label_right_bias, CPLOT_enumColor color)
 Set the right y label.
bool SetGPSLabel (const int UTCOffset)
 Enable the special GPS x axis label with the UTCOffset specified.
bool SetBackgroundColor (const CPLOT_enumColor color)
 Set the figure background color.
void EnablePlotStatistics (const bool enable)
 Enable/Disable the plot statisics.
void SetTheSeriesLabelsBelowThePlot (const bool setBelow)
 Set the labels and statistics to appear below the plot rather than to the right.
bool SetSeriesInfo (const unsigned index, PLOT2D_structSeriesInfo &series)
 Set the options for this series and get the data needed.
bool PlotAll ()
 Plot all the series set with SetSeriesInfo().
bool Plot (PLOT2D_structSeriesInfo &series)
 Call this function to plot a series. Call it repeatedly to plot multiple series.
bool SavePlotToBitmapFile (std::string filename)
 Save the plot to the specified filename.

Protected Attributes

bool m_ArePlotOptionsSet
 A boolean to indicate if m_opt.PlotOptions has been set.
CPLOT m_plot
 The plotting C 'object'.
CPLOT_structSeries m_Series [12]
 The deep level series struct array.
double m_xmin
 For all series the min x value.
double m_xmax
 For all series the max x value.
double m_ymin
 For all series the min y value.
double m_ymax
 For all series the max y value.
_PLOT2D_structMTX m_mtx
 The matrix data that will be obtained from the file(s).
std::string m_prev_datapath
 This is the path to the last data file used.

Data Structures

struct  _PLOT2D_structMTX
 A struct for holding a matrix read from file. More...

Constructor & Destructor Documentation

namespace_Plot2D::Plot2D::Plot2D (  ) 

The default constructor (no data allocated yet).

Definition at line 642 of file Plot2D.cpp.

namespace_Plot2D::Plot2D::~Plot2D (  )  [virtual]

The destructor.

Definition at line 617 of file Plot2D.cpp.


Member Function Documentation

void namespace_Plot2D::Plot2D::SetTitle ( const std::string  title  ) 

Set the figure title.

Definition at line 659 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetNrSeries ( const int  nrSeries  ) 

Set the total number of series to plot.

Returns:
true if successful, false otherwise

Definition at line 665 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetPlotSize ( const int  width_cm,
const int  height_cm 
)

Set the plot size [cm].

Returns:
true if successful, false otherwise

Definition at line 675 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Label ( const std::string  label  ) 

Set the x axis label.

Returns:
true if successful, false otherwise

Definition at line 747 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_isGridOn ( const bool  isGridOn  ) 

Set the x axis grid lines on/off.

Returns:
true if successful, false otherwise

Definition at line 761 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_LowerLimit ( const double  value  ) 

Set the x axis lower limit. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 686 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_UpperLimit ( const double  value  ) 

Set the x axis upper limit. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 700 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_TickStart ( const double  value  ) 

Set the x axis tick start. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 714 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_TickSize ( const double  value  ) 

Set the x axis tick size. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 727 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_X_Axis_TickEnd ( const double  value  ) 

Set the x axis tick end. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 734 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Label ( const std::string  label  ) 

Set the y axis label.

Returns:
true if successful, false otherwise

Definition at line 754 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_isGridOn ( const bool  isGridOn  ) 

Set the y axis grid lines on/off.

Returns:
true if successful, false otherwise

Definition at line 767 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_LowerLimit ( const double  value  ) 

Set the y axis lower limit. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 775 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_UpperLimit ( const double  value  ) 

Set the y axis upper limit. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 789 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_TickStart ( const double  value  ) 

Set the y axis tick start. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 803 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_TickSize ( const double  value  ) 

Set the y axis tick size. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 816 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Set_Y_Axis_TickEnd ( const double  value  ) 

Set the y axis tick end. Otherwise it will be computed automatically based on the first series used.

Returns:
true if successful, false otherwise

Definition at line 823 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetRightYLabel ( const std::string  label,
double  y_label_right_scale_factor,
double  y_label_right_bias,
CPLOT_enumColor  color 
)

Set the right y label.

Returns:
true if successful, false otherwise
Parameters:
label  The description string.
y_label_right_scale_factor  The scale factor.
y_label_right_bias  The bias.
color  The color.

Definition at line 836 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetGPSLabel ( const int  UTCOffset  ) 

Enable the special GPS x axis label with the UTCOffset specified.

Parameters:
UTCOffset always +ve
Returns:
true if successful, false otherwise

Definition at line 854 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetBackgroundColor ( const CPLOT_enumColor  color  ) 

Set the figure background color.

Returns:
true if successful, false otherwise

Definition at line 863 of file Plot2D.cpp.

void namespace_Plot2D::Plot2D::EnablePlotStatistics ( const bool  enable  ) 

Enable/Disable the plot statisics.

Definition at line 870 of file Plot2D.cpp.

void namespace_Plot2D::Plot2D::SetTheSeriesLabelsBelowThePlot ( const bool  setBelow  ) 

Set the labels and statistics to appear below the plot rather than to the right.

Definition at line 875 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SetSeriesInfo ( const unsigned  index,
PLOT2D_structSeriesInfo series 
)

Set the options for this series and get the data needed.

Returns:
true if successful, false otherwise

Definition at line 888 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::PlotAll (  ) 

Plot all the series set with SetSeriesInfo().

Returns:
true if successful, false otherwise

Definition at line 1090 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::Plot ( PLOT2D_structSeriesInfo series  ) 

Call this function to plot a series. Call it repeatedly to plot multiple series.

Returns:
true if successful, false otherwise

Definition at line 1315 of file Plot2D.cpp.

bool namespace_Plot2D::Plot2D::SavePlotToBitmapFile ( std::string  filename  ) 

Save the plot to the specified filename.

Returns:
true if successful, false otherwise

Definition at line 880 of file Plot2D.cpp.


Field Documentation

bool namespace_Plot2D::Plot2D::m_ArePlotOptionsSet [protected]

A boolean to indicate if m_opt.PlotOptions has been set.

Definition at line 249 of file Plot2D.h.

CPLOT namespace_Plot2D::Plot2D::m_plot [protected]

The plotting C 'object'.

Definition at line 258 of file Plot2D.h.

CPLOT_structSeries namespace_Plot2D::Plot2D::m_Series[12] [protected]

The deep level series struct array.

Definition at line 260 of file Plot2D.h.

double namespace_Plot2D::Plot2D::m_xmin [protected]

For all series the min x value.

Definition at line 262 of file Plot2D.h.

double namespace_Plot2D::Plot2D::m_xmax [protected]

For all series the max x value.

Definition at line 263 of file Plot2D.h.

double namespace_Plot2D::Plot2D::m_ymin [protected]

For all series the min y value.

Definition at line 264 of file Plot2D.h.

double namespace_Plot2D::Plot2D::m_ymax [protected]

For all series the max y value.

Definition at line 265 of file Plot2D.h.

_PLOT2D_structMTX namespace_Plot2D::Plot2D::m_mtx [protected]

The matrix data that will be obtained from the file(s).

Definition at line 267 of file Plot2D.h.

std::string namespace_Plot2D::Plot2D::m_prev_datapath [protected]

This is the path to the last data file used.

Definition at line 268 of file Plot2D.h.


The documentation for this class was generated from the following files: