#include <GraphData.h>
Public Member Functions | |
GraphDataI () | |
~GraphDataI () | |
void | set_title (const std::string &t) |
std::string | get_title () const |
void | set_annotations (const std::vector< std::pair< std::string, std::string > > &ann) |
void | get_annotations (std::vector< std::pair< std::string, std::string > > &ann) const |
void | set_axis_title (oh::Axis::ID axis, const std::string &label) |
const std::string & | get_axis_title (oh::Axis::ID axis) const |
std::vector< long > & | indices (oh::Axis::ID axis) |
const std::vector< long > & | get_indices (oh::Axis::ID axis) const |
std::vector< std::string > & | labels (oh::Axis::ID axis) |
const std::vector< std::string > & | get_labels (oh::Axis::ID axis) const |
oh::Axis::Kind | get_axis_type (oh::Axis::ID axis) const |
long | get_bin_count (oh::Axis::ID axis) const |
const std::vector< double > & | get_axis_range (oh::Axis::ID axis) const |
void | get_axis_range (oh::Axis::ID axis, double &low, double &binwidth) const |
void | set_axis_range (oh::Axis::ID axis, const std::vector< double > &xbins) |
void | set_axis_range (oh::Axis::ID axis, const double *edges, unsigned long size) |
void | set_axis_range (oh::Axis::ID axis, double low, double binwidth, unsigned long nbins) |
void | get_errors (std::vector< const double * > &errorArrays) const |
void | set_errors (const std::vector< const double * > &errorArrays) |
void | set_error_style (typename T::ErrorStyle es) |
T::ErrorStyle | get_error_style () const |
unsigned long | get_entries () const |
void | set_entries (unsigned long entries) |
Update the number of points. | |
void | get_points (std::vector< const double * > &valueArrays) const |
void | get_data (std::vector< const double * > &data) const |
void | set_points (const std::vector< const double * > &valueArrays) |
set_dimension
and set_entries
before setting the data and do set_errorstyle
before setting the errors.
oh::GraphDataI< T >::GraphDataI | ( | ) |
Default constructor: Pass the reference of the Graph
object to work on. Remember that the reference hast to be valid as long as you use the interface. is_new
should be set to true when your Graph
object is uninitialized, in order to avoid that GraphDataI tries to access unitialized data.
oh::GraphDataI< T >::~GraphDataI | ( | ) | [inline] |
destructor
void oh::GraphDataI< T >::get_annotations | ( | std::vector< std::pair< std::string, std::string > > & | ann | ) | const |
get annotations
void oh::GraphDataI< T >::get_axis_range | ( | oh::Axis::ID | axis, | |
double & | low, | |||
double & | binwidth | |||
) | const |
Retrieve a fixed axis partition This function may only be called if axis_type() returns FixedAxis.
axis | Must be X, Y or Z. | |
low | Lower edge of the first bin. | |
width | Bin width. |
const std::vector<double>& oh::GraphDataI< T >::get_axis_range | ( | oh::Axis::ID | axis | ) | const |
Retrieve variable axis partition This function may only be called if axis_type() returns VariableAxis.
axis | Must be X, Y or Z. |
const std::string& oh::GraphDataI< T >::get_axis_title | ( | oh::Axis::ID | axis | ) | const |
Retrieve title of axis
oh::Axis::Kind oh::GraphDataI< T >::get_axis_type | ( | oh::Axis::ID | axis | ) | const |
Retrieve axis type
long oh::GraphDataI< T >::get_bin_count | ( | oh::Axis::ID | axis | ) | const |
Retrieve the number of bins for the axis
void oh::GraphDataI< T >::get_data | ( | std::vector< const double * > & | data | ) | const |
get all the data in arrays first all the points then all the errors
unsigned long oh::GraphDataI< T >::get_entries | ( | ) | const |
Retrieve the number of points
T::ErrorStyle oh::GraphDataI< T >::get_error_style | ( | ) | const |
get error style
void oh::GraphDataI< T >::get_errors | ( | std::vector< const double * > & | errorArrays | ) | const |
Retrieve a vector with all error arrays NO COPIES are made For TGraphErrors we have 2 errors: ex,ey For TGraphAsymmErrors we have 4 errors: exl,exh,eyl,eyh For TGraphBentErrors we have 8 errors: exl,exh,eyl,eyh,exld,exhd,eyld,eyhd For TGraph2DErrors we have 3 errors: ex,ey,ez
const std::vector<long>& oh::GraphDataI< T >::get_indices | ( | oh::Axis::ID | axis | ) | const |
Get const reference to the indices of axes labels
const std::vector<std::string>& oh::GraphDataI< T >::get_labels | ( | oh::Axis::ID | axis | ) | const |
Get const reference to the labels of the axes
void oh::GraphDataI< T >::get_points | ( | std::vector< const double * > & | valueArrays | ) | const |
get all points at once NO COPIES are made
std::string oh::GraphDataI< T >::get_title | ( | ) | const |
Get title
std::vector<long>& oh::GraphDataI< T >::indices | ( | oh::Axis::ID | axis | ) |
Get reference to the indices of axes labels
std::vector<std::string>& oh::GraphDataI< T >::labels | ( | oh::Axis::ID | axis | ) |
Returns reference to the array of indices of axes labels.
axis | Must be X, Y or Z. |
void oh::GraphDataI< T >::set_annotations | ( | const std::vector< std::pair< std::string, std::string > > & | ann | ) |
Set annotations
void oh::GraphDataI< T >::set_axis_range | ( | oh::Axis::ID | axis, | |
double | low, | |||
double | binwidth, | |||
unsigned long | nbins | |||
) |
Create a fixed axis partition This function sets axis type to FixedAxis.
axis | Must be X, Y or Z. | |
low | Lower edge of the first bin. | |
width | Bin width. | |
nbins | Number of bins. |
void oh::GraphDataI< T >::set_axis_range | ( | oh::Axis::ID | axis, | |
const double * | edges, | |||
unsigned long | size | |||
) |
Create a variable axis partition This function stores bins range for a particular axis and sets axis type to VariableAxis.
axis | Must be X, Y or Z. | |
edges | A double arary of bin edges. | |
size | Size of the bin edges array. |
void oh::GraphDataI< T >::set_axis_range | ( | oh::Axis::ID | axis, | |
const std::vector< double > & | xbins | |||
) |
Create a variable axis partition This function stores bins range for a particular axis and sets axis type to VariableAxis.
axis | Must be X, Y or Z. | |
xbins | A double std::vector of bin edges. |
void oh::GraphDataI< T >::set_axis_title | ( | oh::Axis::ID | axis, | |
const std::string & | label | |||
) |
Update title of axis
void oh::GraphDataI< T >::set_error_style | ( | typename T::ErrorStyle | es | ) |
Set error style
void oh::GraphDataI< T >::set_errors | ( | const std::vector< const double * > & | errorArrays | ) |
set all the errors, COPIES of the double arrays are made
void oh::GraphDataI< T >::set_points | ( | const std::vector< const double * > & | valueArrays | ) |
set all points at once, COPIES of the arrays are made The vector must provide 2 arrays for normal graphs and 3 arrays for Graph2D graphs
void oh::GraphDataI< T >::set_title | ( | const std::string & | t | ) |
Set title