14 #include "msdevstudio/MSconfig.h"
29 using namespace hippodraw;
73 Range new_range( tlo, thi );
76 double xhi = x + error;
77 double xlo = x - error;
111 Range new_range( tlo, thi );
114 double yhi = y + error;
115 double ylo = y - error;
132 namespace dp = hippodraw::DataPoint2DTuple;
143 unsigned int size = ntuple -> rows ();
144 if ( size == 0 )
return;
149 unsigned int new_size = 0;
151 new_size += 6 *
size;
154 new_size += 6 *
size;
162 for (
unsigned int i = 0;
i <
size;
i++ ) {
163 const vector < double > & row = ntuple -> getRow (
i );
164 double x = row [
dp::X ];
165 double y = row [
dp::Y ];
178 const Rect & user_rect = view -> getUserRect ();
void getRanges(const ViewBase *view)
Gets the ranges of the plotter on X and Y axis.
virtual void drawProjectedValues(const DataSource *ntuple, TransformBase *transform, ViewBase *view)
Draws the projected values.
double high() const
Returns the maximum of the range object.
void makeInBounds(double &x, double &y) const
Changes the coordinates so that they are inside or on the boundary of the rectangle.
hippodraw::ErrorBarRep class interface
A transform that transforms coordinates from one coordinate system to another.
virtual void transform(double &x, double &y) const =0
Transform the coordinates on the X and Y axes.
ErrorBarRep()
The default constructor.
void setYError(bool)
Sets the flag to plot the errors on the Y axis.
std::vector< double > m_y_err
A cache of the Y errors.
A Color class for creating the color object following the standard RGB color space.
void drawXError(double x, double y, double error, const TransformBase &t)
Creates the line segment for the X error bar.
bool m_x_flag
The X error flag.
hippodraw::DataSource class interface.
~ErrorBarRep()
The destructor.
error on X or half bin width
hippodraw::BinaryTransform class interface
virtual const Color & color() const
Returns the representation's color.
bool m_y_flag
The Y error flag.
void drawYError(double x, double y, double error, const TransformBase &t)
Creates the line segment for the Y error bar.
Class representing a rectangle.
Range m_y_range
The Y axis range for cap calculation.
float m_size
The size of the representation.
The abstract base class for views.
void setXError(bool)
Sets the flag to plot the errors on the X axis.
RepBase * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
Range m_x_range
The X axis range for cap calculation.
A transform that transforms coordinates from one 2D coordinate system to another. ...
double low() const
Returns the minimum of the range object.
Expresses a range of values.
hippodraw::DataPointTuple namespace interface
std::vector< double > m_x_err
A cache of the X errors.
hippodraw::ViewBase class interface
float size() const
Returns the size of the representation.
The base class for the point representation hierarchy.
Base class for DataSource.