#include <AxisModelLinear.h>
Inheritance diagram for AxisModelLinear:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>
Oded Wurman <oded@slac.stanford.edu>
Definition at line 27 of file AxisModelLinear.h.
Public Member Functions | |
virtual const Range & | adjustLogValues () |
Adjusts the range for nice logging. | |
virtual const Range & | adjustValues (const Range &) |
Sets the number of minor ticks that are between the major ones. | |
AxisModelLinear (const AxisModelBase &axis_model) | |
The copy-like constructor allows conversion from the log axis model. | |
AxisModelLinear (AxisLoc label, AxisLoc scale) | |
The constructor sets the location of the ticks, labels, and scale. | |
virtual Range | calcHigh (int parm, bool dragging=false) |
virtual Range | calcLow (int parm, bool dragging=false) |
virtual AxisModelBase * | clone () const |
The clone function returns an object of its own kind which is a copy of this object at this moment. | |
double | getFirstTick () const |
Returns the value for the first tick step. | |
AxisLoc | getLabelLocation () const |
double | getMaxTicks () const |
Returns the value for maximum number of ticks. | |
double | getPMag () const |
Returns the magnitude of the power of ten for the tick labels. | |
const Range & | getRange (bool scaled) const |
Returns the range represented by this AxisModel . | |
double | getRMag () const |
Sets the magnitude of the range. | |
double | getScaleFactor () const |
Returns the scale factor. | |
AxisLoc | getScaleLocation () const |
const std::vector< AxisTick > & | getTicks () const |
Returns a reference to the generated ticks. | |
double | getTickStep () const |
Returns the tick step in the true coordinate system. | |
bool | isAutoRanging () const |
Returns true if auto-ranging is enabled; otherwise, returns false . | |
bool | isAutoTicks () const |
Returns true if position of the ticks should be automatically generated. | |
virtual bool | isLog () const |
Returns false because this class represents a linear scale. | |
bool | isScaling () const |
Returns true if the axis is being scaled. | |
virtual bool | needPMag () const |
Returns true if the labels generated for the ticks assume that the magnitude of the exponent will be displayed. | |
void | setAutoRanging (bool flag) |
Sets the auto-ranging flag to flag. | |
void | setAutoTicks (bool yes) |
Sets flag to determine if tick positions should be automatically generated or not. | |
void | setEmpty () |
Sets the range to empty. | |
void | setFirstTick (const double &first_tick) |
Sets the value for first tick step. | |
void | setIntersectRange (const Range &, const Range &) |
Sets the Range to overlap of the two ranges. | |
void | setPMag (const double &pmag) |
Sets the magnitude of the power of ten for the tick labels. | |
void | setRange (const Range &, bool scaled=false) |
The function which changes the m_range member. | |
void | setRange (double low, double high, double pos) |
Sets the Range to the low and high values. | |
void | setRangePos (double) |
The function which changes the pos member of m_range. | |
void | setRMag (const double &rmag) |
Sets the magnitude of the range. | |
void | setScaleFactor (double) |
Sets the value of the scale factor. | |
void | setScaling (bool on=true) |
Sets axis scaling on if on is true . | |
void | setTicks (const std::vector< AxisTick > &ticks) |
Sets the ticks for plotting. | |
void | setTickStep (const double &t_step) |
Sets the tick step. | |
void | setUnionRange (const Range &range) |
Sets the range to be the union of the existing range and range. | |
virtual void | setUsePMag (const bool &use_p_mag) |
Use to set the value of the member variable m_use_pmag. | |
~AxisModelLinear () | |
The destructor. | |
Protected Member Functions | |
void | startDragging (bool dragging) |
Sets the member m_start_dragging to the current range if dragging is starting. | |
Protected Attributes | |
bool | m_auto_range |
The auto-range flag. | |
bool | m_auto_ticks |
A flag set to true if ticks are being automatically generated. | |
bool | m_empty |
A flag to indicate whether the range is empty. | |
double | m_first_tick |
The position of the first tick. | |
bool | m_is_dragging |
The current dragging state. | |
AxisLoc | m_label_location |
const int | m_max_ticks |
The maximum number of ticks. | |
int | m_num_minor_ticks |
double | m_pmag |
The value of the power of ten to be used to multiply the tick labels. | |
Range | m_range |
The current range of the axis. | |
double | m_rmag |
The value of the power of ten of the range to be used to determine how many decimal places are needed. | |
double | m_scale_factor |
The scale factor. | |
AxisLoc | m_scale_location |
Range | m_scaled_range |
The scaled range. | |
bool | m_scaling_on |
If true , the axis is being scaled. | |
Range | m_start_range |
The starting range before start of dragging events. | |
double | m_tick_step |
The distance between two consecutive ticks. | |
std::vector< AxisTick > | m_ticks |
The list of generated ticks. | |
bool | m_use_pmag |
A flag to indicate that one will using scientific notation. |
|
The constructor sets the location of the ticks, labels, and scale.
Definition at line 40 of file AxisModelLinear.cxx. Referenced by clone(). |
|
The copy-like constructor allows conversion from the log axis model.
Definition at line 46 of file AxisModelLinear.cxx. |
|
The destructor.
Definition at line 51 of file AxisModelLinear.cxx. |
|
Adjusts the range for nice logging.
Implements AxisModelBase. Definition at line 170 of file AxisModelLinear.cxx. References AxisModelBase::getRange(). Referenced by adjustValues(). |
|
Sets the number of minor ticks that are between the major ones.
Implements AxisModelBase. Definition at line 77 of file AxisModelLinear.cxx. References std::abs(), adjustLogValues(), AxisModelBase::getRange(), Range::high(), std::log10(), Range::low(), AxisModelBase::m_range, Range::pos(), std::pow(), AxisModelBase::setIntersectRange(), and AxisModelBase::setRange(). |
|
Implements AxisModelBase. Definition at line 196 of file AxisModelLinear.cxx. References Range::high(), Range::length(), Range::low(), AxisModelBase::m_range, AxisModelBase::m_start_range, std::max(), Range::pos(), and AxisModelBase::startDragging(). |
|
Implements AxisModelBase. Definition at line 178 of file AxisModelLinear.cxx. References Range::high(), Range::length(), Range::low(), AxisModelBase::m_range, AxisModelBase::m_start_range, std::min(), Range::pos(), and AxisModelBase::startDragging(). |
|
The clone function returns an object of its own kind which is a copy of this object at this moment.
Implements AxisModelBase. Definition at line 56 of file AxisModelLinear.cxx. References AxisModelLinear(). |
|
Returns the value for the first tick step.
Definition at line 87 of file AxisModelBase.cxx. References AxisModelBase::m_first_tick. Referenced by LogTransform::genTicks(), LinearTransform::genTicks(), Lambert::genTicks(), and HammerAito::genTicks(). |
|
Definition at line 127 of file AxisModelBase.cxx. References AxisModelBase::m_label_location. Referenced by PlotterBaseXML::createAxisModels(), AxisRepBase::drawXLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYLabels(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZTickLines(), and AxisRepBase::setYFontSize(). |
|
Returns the value for maximum number of ticks.
Definition at line 92 of file AxisModelBase.cxx. References AxisModelBase::m_max_ticks. Referenced by LogTransform::genTicks(), and LinearTransform::genTicks(). |
|
Returns the magnitude of the power of ten for the tick labels.
Definition at line 112 of file AxisModelBase.cxx. References AxisModelBase::m_pmag. Referenced by LogTransform::adjustValues(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawYMag(), AxisRepColor::drawZTickLabels(), LinearTransform::genTicks(), Lambert::genTicks(), HammerAito::genTicks(), and LogTransform::setFirstTick(). |
|
|
Sets the magnitude of the range.
Definition at line 102 of file AxisModelBase.cxx. References AxisModelBase::m_rmag. Referenced by LinearTransform::genTicks(), Lambert::genTicks(), and HammerAito::genTicks(). |
|
Returns the scale factor.
Returns the scale factor if isScaling returns
Definition at line 262 of file AxisModelBase.cxx. References AxisModelBase::m_scale_factor, and AxisModelBase::m_scaling_on. Referenced by LogTransform::adjustValues(), LogTransform::genTicks(), LinearTransform::genTicks(), Lambert::genTicks(), HammerAito::genTicks(), StHist1DProjector::getAverage(), DyHist1DProjector::getAverage(), CompositePlotter::processReturnValue(), AxisModelXML::setAttributes(), ContourPointRep::setContourValues(), LinearTransform::setTickStep(), Lambert::setTickStep(), and HammerAito::setTickStep(). |
|
Definition at line 132 of file AxisModelBase.cxx. References AxisModelBase::m_scale_location. Referenced by PlotterBaseXML::createAxisModels(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawYMag(), AxisRepBase::setXFontSize(), AxisRepBase::setYFontSize(), and AxisRepBase::setZFontSize(). |
|
Returns a reference to the generated ticks.
Definition at line 159 of file AxisModelBase.cxx. References AxisModelBase::m_ticks. Referenced by AxisModelXML::createChildren(), AxisRepBase::drawGridLines(), AxisRepBase::drawXTickLabels(), AxisRepBase::drawXTickLines(), AxisRepBase::drawYTickLabels(), AxisRepBase::drawYTickLines(), AxisRepColor::drawZTickLabels(), AxisRepColor::drawZTickLines(), and AxisRepBase::setYFontSize(). |
|
Returns the tick step in the true coordinate system. It may be scaled internally. Definition at line 77 of file AxisModelBase.cxx. References AxisModelBase::m_tick_step. Referenced by LogTransform::genTicks(), LinearTransform::genTicks(), Lambert::genTicks(), HammerAito::genTicks(), LogTransform::nextStep(), AxisModelLog::nextStep(), LogTransform::prevStep(), AxisModelLog::prevStep(), and LinearTransform::setFirstTick(). |
|
Returns
Definition at line 251 of file AxisModelBase.cxx. References AxisModelBase::m_auto_range. Referenced by CompositePlotter::autoScale(), CompositePlotter::isAutoRanging(), and AxisModelXML::setAttributes(). |
|
Returns true if position of the ticks should be automatically generated.
Definition at line 146 of file AxisModelBase.cxx. References AxisModelBase::m_auto_ticks. Referenced by AxisModelXML::setAttributes(). |
|
Returns false because this class represents a linear scale.
Implements AxisModelBase. Definition at line 66 of file AxisModelLinear.cxx. |
|
Returns
Use this member instead of testing against Definition at line 269 of file AxisModelBase.cxx. References AxisModelBase::m_scaling_on. Referenced by DyHist1DProjector::getYLabel(), and Hist2DProjImp::getZLabel(). |
|
Returns
The base class implementation returns Reimplemented from AxisModelBase. Definition at line 71 of file AxisModelLinear.cxx. References AxisModelBase::m_use_pmag. |
|
Sets the auto-ranging flag to flag.
Definition at line 246 of file AxisModelBase.cxx. References AxisModelBase::m_auto_range. Referenced by AxisModelXML::setAttributes(), CompositePlotter::setAutoRanging(), and CompositePlotter::setRangePrivate(). |
|
Sets flag to determine if tick positions should be automatically generated or not.
Definition at line 139 of file AxisModelBase.cxx. References AxisModelBase::m_auto_ticks. |
|
Sets the range to empty.
Definition at line 226 of file AxisModelBase.cxx. References AxisModelBase::m_empty. Referenced by CompositePlotter::autoScaleZ(), and CompositePlotter::setAutoRanging(). |
|
Sets the value for first tick step.
Definition at line 82 of file AxisModelBase.cxx. References AxisModelBase::m_first_tick. Referenced by LogTransform::setFirstTick(), LinearTransform::setFirstTick(), Lambert::setFirstTick(), and HammerAito::setFirstTick(). |
|
Sets the Range to overlap of the two ranges.
Definition at line 200 of file AxisModelBase.cxx. References AxisModelBase::m_range, and Range::setIntersect(). Referenced by LogTransform::adjustValues(), LinearTransform::adjustValues(), AxisModelLog::adjustValues(), adjustValues(), and CompositePlotter::setRangePrivate(). |
|
Sets the magnitude of the power of ten for the tick labels.
Definition at line 107 of file AxisModelBase.cxx. References AxisModelBase::m_pmag. Referenced by LogTransform::setTickStep(), LinearTransform::setTickStep(), Lambert::setTickStep(), and HammerAito::setTickStep(). |
|
The function which changes the m_range member. The only possible user is the plotter object. It sets the range equal to the range of the projector object. Definition at line 171 of file AxisModelBase.cxx. References AxisModelBase::adjustLogValues(), Range::high(), AxisModelBase::isLog(), Range::length(), Range::low(), AxisModelBase::m_empty, AxisModelBase::m_range, AxisModelBase::m_scale_factor, and Range::pos(). |
|
Sets the Range to the low and high values.
Definition at line 165 of file AxisModelBase.cxx. References AxisModelBase::m_range, Range::setRange(), and std::swap(). Referenced by LogTransform::adjustLogValues(), AxisModelLog::adjustLogValues(), LinearTransform::adjustValues(), adjustValues(), CompositePlotter::prepareToDraw(), AxisModelXML::setAttributes(), Profile2DProjector::setOffset(), Hist2DProjImp::setOffset(), BinningProjector::setOffset(), ProfileProjector::setRange(), Profile2DProjector::setRange(), Hist2DProjImp::setRange(), Hist1DProjImp::setRange(), and CompositePlotter::setRangePrivate(). |
|
The function which changes the pos member of m_range.
Definition at line 208 of file AxisModelBase.cxx. References AxisModelBase::m_range, and Range::setPos(). Referenced by DisplayController::setAxisModel(). |
|
Sets the magnitude of the range.
Definition at line 97 of file AxisModelBase.cxx. References AxisModelBase::m_rmag. Referenced by LogTransform::setTickStep(), LinearTransform::setTickStep(), Lambert::setTickStep(), and HammerAito::setTickStep(). |
|
Sets the value of the scale factor.
Definition at line 256 of file AxisModelBase.cxx. References AxisModelBase::m_scale_factor, and AxisModelBase::m_scaling_on. Referenced by Hist2DProjImp::checkScaling(), Hist1DProjImp::checkScaling(), AxisModelXML::setAttributes(), and CompositePlotter::setScaleFactor(). |
|
Sets axis scaling on if on is
Definition at line 274 of file AxisModelBase.cxx. References AxisModelBase::m_scale_factor, and AxisModelBase::m_scaling_on. Referenced by Hist2DProjImp::checkScaling(), Hist1DProjImp::checkScaling(), and CompositePlotter::setScaling(). |
|
Sets the ticks for plotting.
Definition at line 153 of file AxisModelBase.cxx. References AxisModelBase::m_ticks. |
|
Sets the tick step.
Definition at line 72 of file AxisModelBase.cxx. References AxisModelBase::m_tick_step. Referenced by LogTransform::setTickStep(), LinearTransform::setTickStep(), Lambert::setTickStep(), and HammerAito::setTickStep(). |
|
Sets the range to be the union of the existing range and range. If the current range is empty, then set the range to range. Definition at line 214 of file AxisModelBase.cxx. References AxisModelBase::m_empty, AxisModelBase::m_range, Range::setEmpty(), and Range::setUnion(). Referenced by CompositePlotter::autoScale(), and CompositePlotter::autoScaleZ(). |
|
Use to set the value of the member variable m_use_pmag.
Definition at line 122 of file AxisModelBase.cxx. References AxisModelBase::m_use_pmag. Referenced by LinearTransform::genTicks(), Lambert::genTicks(), and HammerAito::genTicks(). |
|
Sets the member m_start_dragging to the current range if dragging is starting.
Definition at line 280 of file AxisModelBase.cxx. References AxisModelBase::m_is_dragging, AxisModelBase::m_range, and AxisModelBase::m_start_range. Referenced by AxisModelLog::calcHigh(), calcHigh(), AxisModelLog::calcLow(), and calcLow(). |
|
The auto-range flag.
When set Definition at line 51 of file AxisModelBase.h. Referenced by AxisModelBase::isAutoRanging(), and AxisModelBase::setAutoRanging(). |
|
A flag set to
Definition at line 103 of file AxisModelBase.h. Referenced by AxisModelBase::isAutoTicks(), and AxisModelBase::setAutoTicks(). |
|
A flag to indicate whether the range is empty.
Definition at line 54 of file AxisModelBase.h. Referenced by AxisModelBase::setEmpty(), AxisModelBase::setRange(), and AxisModelBase::setUnionRange(). |
|
The position of the first tick.
Definition at line 68 of file AxisModelBase.h. Referenced by AxisModelBase::getFirstTick(), and AxisModelBase::setFirstTick(). |
|
The current dragging state.
Definition at line 47 of file AxisModelBase.h. Referenced by AxisModelBase::startDragging(). |
|
Definition at line 81 of file AxisModelBase.h. Referenced by AxisModelBase::getLabelLocation(). |
|
The maximum number of ticks.
Definition at line 75 of file AxisModelBase.h. Referenced by AxisModelBase::getMaxTicks(). |
|
Definition at line 79 of file AxisModelBase.h. |
|
The value of the power of ten to be used to multiply the tick labels. It has been scaled by the scale factor. Definition at line 86 of file AxisModelBase.h. Referenced by AxisModelLog::adjustValues(), AxisModelBase::getPMag(), AxisModelBase::setPMag(), and AxisModelLog::setTickStep(). |
|
The current range of the axis.
Definition at line 36 of file AxisModelBase.h. Referenced by AxisModelLog::adjustLogValues(), AxisModelLog::adjustValues(), adjustValues(), AxisModelLog::calcHigh(), calcHigh(), AxisModelLog::calcLow(), calcLow(), AxisModelBase::getRange(), AxisModelBase::setIntersectRange(), AxisModelBase::setRange(), AxisModelBase::setRangePos(), AxisModelBase::setUnionRange(), and AxisModelBase::startDragging(). |
|
The value of the power of ten of the range to be used to determine how many decimal places are needed.
Definition at line 95 of file AxisModelBase.h. Referenced by AxisModelBase::getRMag(), AxisModelBase::setRMag(), and AxisModelLog::setTickStep(). |
|
The scale factor. For normal displays, the value is 1.0. However, for something like histogram displays, the value will be the bin width. This is done so that instead of displaying the density ,the number of entries will be displayed. Definition at line 60 of file AxisModelBase.h. Referenced by AxisModelLog::adjustValues(), AxisModelBase::getRange(), AxisModelBase::getScaleFactor(), AxisModelBase::setRange(), AxisModelBase::setScaleFactor(), and AxisModelBase::setScaling(). |
|
Definition at line 82 of file AxisModelBase.h. Referenced by AxisModelBase::getScaleLocation(). |
|
The scaled range.
Definition at line 39 of file AxisModelBase.h. Referenced by AxisModelBase::getRange(). |
|
If
Definition at line 63 of file AxisModelBase.h. Referenced by AxisModelBase::getScaleFactor(), AxisModelBase::isScaling(), AxisModelBase::setScaleFactor(), and AxisModelBase::setScaling(). |
|
The starting range before start of dragging events. While dragging, the setLow or setHigh member functions use this Range value rather than the current value to set the new range. Definition at line 44 of file AxisModelBase.h. Referenced by AxisModelLog::calcHigh(), calcHigh(), AxisModelLog::calcLow(), calcLow(), and AxisModelBase::startDragging(). |
|
The distance between two consecutive ticks. It has been scaled by the scale factor. Definition at line 72 of file AxisModelBase.h. Referenced by AxisModelBase::getTickStep(), AxisModelLog::setTickStep(), and AxisModelBase::setTickStep(). |
|
The list of generated ticks.
Definition at line 98 of file AxisModelBase.h. Referenced by AxisModelBase::getTicks(), and AxisModelBase::setTicks(). |
|
A flag to indicate that one will using scientific notation. That is the member m_pmag becomes significant in the display of the tick labels. Definition at line 91 of file AxisModelBase.h. Referenced by needPMag(), AxisModelBase::needPMag(), and AxisModelBase::setUsePMag(). |