SynAPSE  0.6.0
Synergistic Analysis of Phase Space Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Private Attributes
ScatterGraph Class Reference

Defines functions that allow to plot a ROOT scatter graph with a color scale. More...

#include <ScatterGraph.hh>

Public Member Functions

 ScatterGraph ()
 Default constructor - initialises to 0/NULL. More...
 
 ScatterGraph (const ScatterGraph &scat)
 Copy constructor - any pointers are deep copied. More...
 
ScatterGraph & operator= (const ScatterGraph &scat)
 Equality operator - any pointers are deep copied. More...
 
 ScatterGraph (size_t n)
 Constructor with number of points to be hosted. More...
 
 ScatterGraph (size_t n, double *x, double *y, double *z)
 Constructor with data. More...
 
 ScatterGraph (const char *name, const char *title, size_t n, double *x, double *y, double *z)
 Full constructor with name, title and data. More...
 
 ScatterGraph (const TGraph2D &graph)
 Initializes the underlying TGraph2D from another TGraph2D. More...
 
virtual ~ScatterGraph ()
 Destructor - any member pointers are deleted. More...
 
void AddPoint (double x, double y, double w=1)
 Sets one of the points to a certain value. More...
 
void SetPoint (size_t i, double x, double y, double w=1)
 Sets one of the points to a certain value. More...
 
void SetPoints (size_t n, double *x, double *y, double *w)
 Sets one of the points to a certain value. More...
 
void SetOrder (const Order &order)
 Sets the order in which the points are drawn. More...
 
void SetMaxSize (const size_t &size)
 Sets the maximum amount of points to be drawn. More...
 
void Draw ()
 Draws the scatter plot. More...
 
void Save ()
 Saves the scatter plot. More...
 
void SetName (const char *name)
 Sets the name of the underlying TGraph2D. More...
 
virtual const char * GetName () const
 Returns the name of the underlying TGraph2D. More...
 
void SetTitle (const char *title)
 Sets the name of the underlying TGraph2D. More...
 
virtual const char * GetTitle () const
 Returns the title of the underlying TGraph2D. More...
 
size_t GetN () const
 Returns the number of entries in the underlying TGraph2D. More...
 
TGraph2D * GetGraph2D ()
 Returns the the underlying TGraph2D. More...
 
TGaxis * GetXaxis ()
 Returns a pointer to the x axis, in order to set its attributes. More...
 
TGaxis * GetYaxis ()
 Returns a pointer to the y axis, in order to set its attributes. More...
 
TAxis * GetZaxis ()
 Returns a pointer to the y axis, in order to set its attributes. More...
 
void SetMinimum (const double min)
 Sets the minimum of the underlying TGraph2D. More...
 
void SetMaximum (const double max)
 Sets the minimum of the underlying TGraph2D. More...
 
void SetRange (double minx, double miny, double maxx, double maxy)
 Sets the limits of the x and y axes. More...
 
void SetMarkerStyle (int style)
 Sets the marker style of the underlying TGraph2D. More...
 
void SetMarkerSize (double size)
 Sets the marker size of the underlying TGraph2D. More...
 
void SetXaxisTitle (const char *title="")
 Sets the title of the x axis. More...
 
void SetYaxisTitle (const char *title="")
 Sets the title of the y axis. More...
 
void Write ()
 Save the histogram to the root file. More...
 

Private Attributes

TGraph2D * _graph
 Underlying TGraph2D object. More...
 
TGaxis * _xaxis
 Underlying TGaxis object defined for the x axis. More...
 
TGaxis * _yaxis
 Underlying TGaxis object defined for the y axis. More...
 

Detailed Description

Defines functions that allow to plot a ROOT scatter graph with a color scale.

It is a class derives from the TGraph2D class drawn with the PCOLZ drawing option, viewed from top, with updated TGaxis that fit the canvas in an elegant way.

Constructor & Destructor Documentation

ScatterGraph::ScatterGraph ( )

Default constructor - initialises to 0/NULL.

ScatterGraph::ScatterGraph ( const ScatterGraph &  scat)

Copy constructor - any pointers are deep copied.

ScatterGraph::ScatterGraph ( size_t  n)

Constructor with number of points to be hosted.

ScatterGraph::ScatterGraph ( size_t  n,
double *  x,
double *  y,
double *  z 
)

Constructor with data.

ScatterGraph::ScatterGraph ( const char *  name,
const char *  title,
size_t  n,
double *  x,
double *  y,
double *  z 
)

Full constructor with name, title and data.

ScatterGraph::ScatterGraph ( const TGraph2D &  graph)

Initializes the underlying TGraph2D from another TGraph2D.

ScatterGraph::~ScatterGraph ( )
virtual

Destructor - any member pointers are deleted.

Member Function Documentation

void ScatterGraph::AddPoint ( double  x,
double  y,
double  w = 1 
)

Sets one of the points to a certain value.

void ScatterGraph::Draw ( )

Draws the scatter plot.

TGraph2D* ScatterGraph::GetGraph2D ( )
inline

Returns the the underlying TGraph2D.

size_t ScatterGraph::GetN ( ) const
inline

Returns the number of entries in the underlying TGraph2D.

virtual const char* ScatterGraph::GetName ( ) const
inlinevirtual

Returns the name of the underlying TGraph2D.

virtual const char* ScatterGraph::GetTitle ( ) const
inlinevirtual

Returns the title of the underlying TGraph2D.

TGaxis* ScatterGraph::GetXaxis ( )
inline

Returns a pointer to the x axis, in order to set its attributes.

TGaxis* ScatterGraph::GetYaxis ( )
inline

Returns a pointer to the y axis, in order to set its attributes.

TAxis* ScatterGraph::GetZaxis ( )
inline

Returns a pointer to the y axis, in order to set its attributes.

ScatterGraph & ScatterGraph::operator= ( const ScatterGraph &  scat)

Equality operator - any pointers are deep copied.

void ScatterGraph::Save ( )

Saves the scatter plot.

void ScatterGraph::SetMarkerSize ( double  size)
inline

Sets the marker size of the underlying TGraph2D.

void ScatterGraph::SetMarkerStyle ( int  style)
inline

Sets the marker style of the underlying TGraph2D.

void ScatterGraph::SetMaximum ( const double  max)
inline

Sets the minimum of the underlying TGraph2D.

void ScatterGraph::SetMaxSize ( const size_t &  size)

Sets the maximum amount of points to be drawn.

void ScatterGraph::SetMinimum ( const double  min)
inline

Sets the minimum of the underlying TGraph2D.

void ScatterGraph::SetName ( const char *  name)
inline

Sets the name of the underlying TGraph2D.

void ScatterGraph::SetOrder ( const Order &  order)

Sets the order in which the points are drawn.

void ScatterGraph::SetPoint ( size_t  i,
double  x,
double  y,
double  w = 1 
)
inline

Sets one of the points to a certain value.

void ScatterGraph::SetPoints ( size_t  n,
double *  x,
double *  y,
double *  w 
)

Sets one of the points to a certain value.

void ScatterGraph::SetRange ( double  minx,
double  miny,
double  maxx,
double  maxy 
)

Sets the limits of the x and y axes.

void ScatterGraph::SetTitle ( const char *  title)
inline

Sets the name of the underlying TGraph2D.

void ScatterGraph::SetXaxisTitle ( const char *  title = "")
inline

Sets the title of the x axis.

void ScatterGraph::SetYaxisTitle ( const char *  title = "")
inline

Sets the title of the y axis.

void ScatterGraph::Write ( )
inline

Save the histogram to the root file.

Field Documentation

TGraph2D* ScatterGraph::_graph
private

Underlying TGraph2D object.

TGaxis* ScatterGraph::_xaxis
private

Underlying TGaxis object defined for the x axis.

TGaxis* ScatterGraph::_yaxis
private

Underlying TGaxis object defined for the y axis.


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