Relacs Plot Library  0.9.8
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Plot::DataElement Class Referenceabstract

#include <plot.h>

Inheritance diagram for Plot::DataElement:
Inheritance graph
[legend]
Collaboration diagram for Plot::DataElement:
Collaboration graph
[legend]

Public Types

enum  DataTypes { SinglePoint, TwoPoints, Map, Events }
 

Public Member Functions

 DataElement (DataTypes dt)
 
virtual ~DataElement (void)
 
void setAxis (Plot::Axis axis)
 
void setAxis (int xaxis, int yaxis)
 
void setLineIndex (long inx)
 
long lineIndex () const
 
void setPointIndex (long inx)
 
long pointIndex () const
 
void setLine (const Plot::LineStyle &style)
 
void setLine (int lcolor=Transparent, int lwidth=1, Plot::Dash ldash=Solid)
 
void setPoint (const Plot::PointStyle &style)
 
void setPoint (Points ptype=Circle, int psize=10, int pcolor=Transparent, int pfill=Transparent)
 
void setStyle (const Plot::LineStyle &lstyle, const Plot::PointStyle &pstyle)
 
void setStyle (int lcolor=Transparent, int lwidth=1, Plot::Dash ldash=Solid, Points ptype=Circle, int psize=10, int pcolor=Transparent, int pfill=Transparent)
 
virtual long first (double x1, double y1, double x2, double y2) const =0
 
virtual long last (double x1, double y1, double x2, double y2) const =0
 
virtual void point (long index, double &x, double &y) const =0
 
virtual void errors (long index, double &up, double &down) const
 
virtual void vector (long index, double &a, double &l) const
 
virtual bool init (void)
 
virtual void xminmax (double &xmin, double &xmax, double ymin, double ymax) const
 
virtual void yminmax (double xmin, double xmax, double &ymin, double &ymax) const
 
virtual void setRange (double xmin[MaxAxis], double xmax[MaxAxis], double ymin[MaxAxis], double ymax[MaxAxis], int xpmin, int xpmax, int ypmin, int ypmax)
 

Protected Attributes

bool Own
 
int XAxis
 
int YAxis
 
int LineIndex
 
int PointIndex
 
DataTypes DataType
 
Plot::LineStyle Line
 
Plot::PointStyle Point
 

Friends

class Plot
 

Detailed Description

Manages a single 2-D data item for plotting lines.

Author
Jan Benda

Member Enumeration Documentation

enum DataTypes
Enumerator
SinglePoint 
TwoPoints 
Map 
Events 

Constructor & Destructor Documentation

~DataElement ( void  )
virtual

Member Function Documentation

void setAxis ( Plot::Axis  axis)
void setAxis ( int  xaxis,
int  yaxis 
)
void setLineIndex ( long  inx)
long lineIndex ( ) const
void setPointIndex ( long  inx)
long pointIndex ( ) const
void setLine ( const Plot::LineStyle style)
void setLine ( int  lcolor = Transparent,
int  lwidth = 1,
Plot::Dash  ldash = Solid 
)
void setPoint ( const Plot::PointStyle style)
void setPoint ( Points  ptype = Circle,
int  psize = 10,
int  pcolor = Transparent,
int  pfill = Transparent 
)
void setStyle ( const Plot::LineStyle lstyle,
const Plot::PointStyle pstyle 
)
void setStyle ( int  lcolor = Transparent,
int  lwidth = 1,
Plot::Dash  ldash = Solid,
Plot::Points  ptype = Circle,
int  psize = 10,
int  pcolor = Transparent,
int  pfill = Transparent 
)
virtual long first ( double  x1,
double  y1,
double  x2,
double  y2 
) const
pure virtual

The index of the first data point in the x-range x1, x2 and the y-range y1, y2.

virtual long last ( double  x1,
double  y1,
double  x2,
double  y2 
) const
pure virtual

The index of the last data point in the x-range x1, x2 and the y-range y1, y2.

virtual void point ( long  index,
double &  x,
double &  y 
) const
pure virtual

Returns the x coordinate and y coordinate of the data point at index\ a index.

virtual void errors ( long  index,
double &  up,
double &  down 
) const
inlinevirtual
virtual void vector ( long  index,
double &  a,
double &  l 
) const
inlinevirtual
virtual bool init ( void  )
inlinevirtual

Can be reimplemented for some initialization before initializing and drawing the plot.

Returns
true if the data changed
virtual void xminmax ( double &  xmin,
double &  xmax,
double  ymin,
double  ymax 
) const
inlinevirtual

Returns a sensible x-range xmin and xmax for a given y-range ymin, ymax.

virtual void yminmax ( double  xmin,
double  xmax,
double &  ymin,
double &  ymax 
) const
inlinevirtual

Returns a sensible y-range ymin and ymax for a given x-range xmin, xmax.

virtual void setRange ( double  xmin[MaxAxis],
double  xmax[MaxAxis],
double  ymin[MaxAxis],
double  ymax[MaxAxis],
int  xpmin,
int  xpmax,
int  ypmin,
int  ypmax 
)
inlinevirtual

Passes the current ranges and pixel positions to the data element after initializing but before drawing the plot.

Friends And Related Function Documentation

friend class Plot
friend

Member Data Documentation

bool Own
protected
int XAxis
protected
int YAxis
protected
int LineIndex
protected
int PointIndex
protected
DataTypes DataType
protected
Plot::LineStyle Line
protected
Plot::PointStyle Point
protected

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