#include <ErrorBarRep.h>
Inheritance diagram for ErrorBarRep:
Oded Wurman <owurman@stanford.edu>
Definition at line 26 of file ErrorBarRep.h.
Public Member Functions | |
RepBase * | clone () |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
virtual const Color & | color () const |
Returns the representation's color. | |
virtual void | displayError (ViewBase &view) |
Display an error message. | |
virtual void | drawProjectedValues (const DataSource *ntuple, TransformBase *transform, ViewBase *view) |
Draws the projected values. | |
ErrorBarRep () | |
The default constructor. | |
virtual const Color & | getColor () const |
Get the color of the representation. | |
virtual unsigned int | getStyle () const |
Returns the style of the point representation. | |
virtual const BinToColor * | getValueTransform () const |
Returns the value transform. | |
virtual bool | isSelected () const |
Returns true if representation is in selected state, otherwise returns false . | |
const std::string & | name () const |
Returns the name of the representation. | |
virtual void | setColor (const Color &) |
Sets the color of the representation. | |
virtual void | setErrorOn (const std::string &axis, bool yes=true) |
Sets the error representation on specified axis, if any, to yes. | |
virtual void | setHighLighted (bool yes) |
Sets the highlighted state of the point representation. | |
virtual void | setSelected (bool yes=true) |
Sets the representation to be selected if yes is true , otherwise set it to be deselected. | |
void | setSize (float value) |
Sets the size of the representation. | |
virtual void | setStyle (unsigned int style) |
Sets the symbol of the representation. | |
void | setText (const std::string &text) |
Sets the text. | |
virtual void | setValueTransform (BinToColor *) |
Sets the value transform. | |
void | setXError (bool) |
Sets the flag to plot the errors on the X axis. | |
void | setYError (bool) |
Sets the flag to plot the errors on the Y axis. | |
float | size () const |
Returns the size of the representation. | |
virtual bool | xError () const |
Returns true if the point representation displays error on the X axis. | |
virtual bool | yError () const |
Returns true if the point representation displays error on the Y axis. | |
~ErrorBarRep () | |
The destructor. | |
Protected Attributes | |
Color | m_color |
The color of the representation. | |
bool | m_desel |
A flag to indicate the representation is de-selected. | |
bool | m_highlite |
Sets the state of highlighting. | |
std::string | m_name |
The name of the representation. | |
float | m_size |
The size of the representation. | |
std::string | m_text |
The text to be displayed before the statistics. | |
Static Protected Attributes | |
static const Color | s_desel_color |
The color of the representation when it is de-selected. | |
Private Member Functions | |
void | drawXError (double x, double y, double error, ViewBase &vb, const TransformBase &t) |
Creates the line segment for the X error bar. | |
void | drawYError (double x, double y, double error, ViewBase &vb, const TransformBase &t) |
Creates the line segment for the Y error bar. | |
void | getRanges (const DataSource *ntuple) |
Gets the ranges of the data. | |
Private Attributes | |
double | m_x_cap |
The X error bar cap length. | |
std::vector< double > | m_x_err |
A cache of the X errors. | |
bool | m_x_flag |
The X error flag. | |
Range | m_x_range |
The X axis range for cap calculation. | |
double | m_y_cap |
The Y error bar cap length. | |
std::vector< double > | m_y_err |
A cache of the Y errors. | |
bool | m_y_flag |
The Y error flag. | |
Range | m_y_range |
The Y axis range for cap calculation. |
|
The default constructor.
Definition at line 31 of file ErrorBarRep.cxx. Referenced by clone(). |
|
The destructor.
Definition at line 40 of file ErrorBarRep.cxx. |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements RepBase. Definition at line 44 of file ErrorBarRep.cxx. References ErrorBarRep(). Referenced by ColumnPointRep::ColumnPointRep(), and SymbolPointRep::SymbolPointRep(). |
|
Returns the representation's color.
Definition at line 61 of file RepBase.cxx. References RepBase::m_color, RepBase::m_desel, and RepBase::s_desel_color. Referenced by ContourPointRep::createContours(), SymbolPointRep::drawProjectedValues(), LinePointRep::drawProjectedValues(), drawProjectedValues(), ColumnPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), and DataRep::getRepColor(). |
|
Display an error message. Display an error message instead of drawing a point. This base class implementation displays a message with the name of the RepBase object. Definition at line 153 of file RepBase.cxx. References ViewBase::drawText(), RepBase::m_name, and RepBase::m_size. |
|
Draws the projected values. Draws the projected values contained in the DataSource ntuple. Each row of the ntuple is data point tuple of some dimension. Derived classes expect the DataSoruce to be of the correct dimension. The drawn points undergo a transform represented by transform and are drawn to the view view. If highlighting is on, uses the ranges to control highlighting. Implements RepBase. Definition at line 167 of file ErrorBarRep.cxx. References RepBase::color(), drawXError(), drawYError(), getRanges(), RepBase::m_size, m_x_cap, m_x_err, m_x_flag, m_y_cap, m_y_err, m_y_flag, HippoRectangle::makeInBounds(), RepBase::size(), hippodraw::Line::Solid, hippodraw::Axes::X, hippodraw::DataPoint2DTuple::XERR, hippodraw::Axes::Y, and hippodraw::DataPoint2DTuple::YERR. |
|
Creates the line segment for the X error bar.
Definition at line 59 of file ErrorBarRep.cxx. References Range::high(), Range::length(), Range::low(), m_x_cap, m_x_err, m_y_err, m_y_range, and BinaryTransform::transform(). Referenced by drawProjectedValues(). |
|
Creates the line segment for the Y error bar.
Definition at line 114 of file ErrorBarRep.cxx. References Range::high(), Range::length(), Range::low(), m_x_err, m_x_range, m_y_cap, m_y_err, and BinaryTransform::transform(). Referenced by drawProjectedValues(). |
|
Get the color of the representation.
Definition at line 56 of file RepBase.cxx. References RepBase::m_color. Referenced by PointRepXML::createElement(). |
|
Gets the ranges of the data.
Definition at line 219 of file ErrorBarRep.cxx. References m_x_range, m_y_range, hippodraw::Axes::X, and hippodraw::Axes::Y. Referenced by drawProjectedValues(). |
|
Returns the style of the point representation. Derived class should override this member function if they support styles. This base class implementation returns 0. Reimplemented in ColumnPointRep, LinePointRep, LinePointRep, and SymbolPointRep. Definition at line 108 of file RepBase.cxx. Referenced by PointRepXML::setAttributes(). |
|
Returns the value transform. A value transform changes a binary value to some graphical representations such as color. The implementation in this base class returns a null pointer. Derived classes that implement value transform should return a pointer to the object it uses. Reimplemented in ColorBoxPointRep, ColorSymbolPointRep, and ContourPointRep. Definition at line 139 of file RepBase.cxx. Referenced by PointRepXML::createElement(). |
|
Returns
Definition at line 77 of file RepBase.cxx. References RepBase::m_desel. Referenced by DataRep::isSelected(). |
|
Returns the name of the representation. This name might be used by a Factory. Definition at line 45 of file RepBase.cxx. References RepBase::m_name. Referenced by FuncParmRep::drawProjectedValues(), PointRepXML::setAttributes(), QtDisplay::setContourLevels(), and Inspector::updatePlotTab(). |
|
Sets the color of the representation.
Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 51 of file RepBase.cxx. References RepBase::m_color. Referenced by PointRepXML::createObject(), CutRangeRep::CutRangeRep(), FunctionRep::FunctionRep(), LineDataRep::LineDataRep(), SymbolPointRep::setColor(), ColumnPointRep::setColor(), and DataRep::setRepColor(). |
|
Sets the error representation on specified axis, if any, to yes.
Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 128 of file RepBase.cxx. Referenced by PointRepXML::createObject(), and DataRep::setErrorDisplay(). |
|
Sets the highlighted state of the point representation. If yes is true, then the point representation should show the non highlighted regions in some fashion, typically using light gray color instead of its normal color.
Definition at line 84 of file RepBase.cxx. References RepBase::m_highlite. |
|
Sets the representation to be selected if yes is
Reimplemented in PointRepBase. Definition at line 70 of file RepBase.cxx. References RepBase::m_desel. Referenced by PointRepBase::setSelected(), and DataRep::setSelected(). |
|
Sets the size of the representation.
Definition at line 94 of file RepBase.cxx. References RepBase::m_size. Referenced by PointRepXML::createObject(), FunctionRep::FunctionRep(), and DataRep::setRepSize(). |
|
Sets the symbol of the representation. Derived classes may use this method to set the style of the representation, if they have various styles. This base class implementation does nothing. Reimplemented in ColumnPointRep, LinePointRep, LinePointRep, and SymbolPointRep. Definition at line 101 of file RepBase.cxx. Referenced by DataRep::setRepStyle(). |
|
Sets the text.
Definition at line 132 of file RepBase.cxx. References RepBase::m_text. Referenced by DisplayController::createTextDataRep(). |
|
Sets the value transform. The implementation in this base class does nothing. Derived classes that implement a value transform should override this method and take possession of the received object.
Reimplemented in ColorBoxPointRep, ColorSymbolPointRep, and ContourPointRep. Definition at line 146 of file RepBase.cxx. |
|
Sets the flag to plot the errors on the X axis.
Definition at line 49 of file ErrorBarRep.cxx. References m_x_flag. Referenced by SymbolPointRep::setErrorOn(). |
|
Sets the flag to plot the errors on the Y axis.
Definition at line 54 of file ErrorBarRep.cxx. References m_y_flag. Referenced by SymbolPointRep::setErrorOn(), and ColumnPointRep::setErrorOn(). |
|
Returns the size of the representation.
Definition at line 89 of file RepBase.cxx. References RepBase::m_size. Referenced by ContourPointRep::createContours(), ContourPointRep::drawContourTicks(), SymbolPointRep::drawProjectedValues(), LinePointRep::drawProjectedValues(), drawProjectedValues(), ContourPointRep::drawProjectedValues(), ColumnPointRep::drawProjectedValues(), ColorSymbolPointRep::drawProjectedValues(), ColorBoxPointRep::drawProjectedValues(), DisplayController::pointSize(), and PointRepXML::setAttributes(). |
|
Returns true if the point representation displays error on the X axis.
The default implementation returns Reimplemented in SymbolPointRep. Definition at line 114 of file RepBase.cxx. Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes(). |
|
Returns true if the point representation displays error on the Y axis.
The default implementation returns Reimplemented in ColumnPointRep, and SymbolPointRep. Definition at line 120 of file RepBase.cxx. Referenced by DataRep::isErrorDisplayed(), and PointRepXML::setAttributes(). |
|
The color of the representation.
Definition at line 55 of file RepBase.h. Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), RepBase::getColor(), and RepBase::setColor(). |
|
A flag to indicate the representation is de-selected.
Definition at line 64 of file RepBase.h. Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), CutRangeRep::drawNormalRange(), ColorBoxPointRep::drawProjectedValues(), RepBase::isSelected(), and RepBase::setSelected(). |
|
Sets the state of highlighting.
Definition at line 68 of file RepBase.h. Referenced by RepBase::setHighLighted(). |
|
The name of the representation.
Definition at line 49 of file RepBase.h. Referenced by AverageTextRep::AverageTextRep(), ColorSymbolPointRep::ColorSymbolPointRep(), RepBase::displayError(), ContourPointRep::init(), and RepBase::name(). |
|
|
The text to be displayed before the statistics.
Definition at line 52 of file RepBase.h. Referenced by BoxTextRep::drawProjectedValues(), and RepBase::setText(). |
|
The X error bar cap length.
Definition at line 46 of file ErrorBarRep.h. Referenced by drawProjectedValues(), and drawXError(). |
|
A cache of the X errors.
Definition at line 32 of file ErrorBarRep.h. Referenced by drawProjectedValues(), drawXError(), and drawYError(). |
|
The X error flag.
If set Definition at line 39 of file ErrorBarRep.h. Referenced by drawProjectedValues(), and setXError(). |
|
The X axis range for cap calculation.
Definition at line 52 of file ErrorBarRep.h. Referenced by drawYError(), and getRanges(). |
|
The Y error bar cap length.
Definition at line 49 of file ErrorBarRep.h. Referenced by drawProjectedValues(), and drawYError(). |
|
A cache of the Y errors.
Definition at line 35 of file ErrorBarRep.h. Referenced by drawProjectedValues(), drawXError(), and drawYError(). |
|
The Y error flag.
If set Definition at line 43 of file ErrorBarRep.h. Referenced by drawProjectedValues(), and setYError(). |
|
The Y axis range for cap calculation.
Definition at line 55 of file ErrorBarRep.h. Referenced by drawXError(), and getRanges(). |
|
The color of the representation when it is de-selected.
Referenced by RepBase::color(), CutRangeRep::drawInvertedRange1D(), CutRangeRep::drawInvertedRange2D(), and CutRangeRep::drawNormalRange(). |