#include <AxisModelBase.h>
Inheritance diagram for AxisModelBase:
Kaustuv <kaustuv@stanford.edu>
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>
Sanket Malde <sanket@stanford.edu>
Oded Wurman <owurman@stanford.edu>
Definition at line 31 of file AxisModelBase.h.
Public Member Functions | |
virtual const Range & | adjustLogValues ()=0 |
Adjust the range for nice logging. | |
virtual const Range & | adjustValues (const Range &limit)=0 |
Adjusts the range on the axis to nice values within the Range limit. | |
AxisModelBase (const AxisModelBase &axis_model) | |
The copy constructor. | |
AxisModelBase (AxisLoc label, AxisLoc scale) | |
The constructor sets the location of the ticks, labels, and scale. | |
virtual Range | calcHigh (int parm, bool dragging=false)=0 |
Sets the high end of the Range and returns the new Range. | |
virtual Range | calcLow (int parm, bool dragging=false)=0 |
Sets the low end of the Range and returns the new Range. | |
virtual AxisModelBase * | clone () const =0 |
Returns a copy of the object. | |
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 =0 |
Returns a boolean describing the type of the scale of the axis. | |
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. | |
virtual | ~AxisModelBase () |
The virtual 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 27 of file AxisModelBase.cxx. |
|
The copy constructor.
Definition at line 47 of file AxisModelBase.cxx. |
|
The virtual destructor.
Definition at line 68 of file AxisModelBase.cxx. |
|
Adjust the range for nice logging.
Implemented in AxisModelLinear, and AxisModelLog. Referenced by setRange(). |
|
Adjusts the range on the axis to nice values within the Range limit.
Implemented in AxisModelLinear, and AxisModelLog. |
|
Sets the high end of the Range and returns the new Range. The parameter parm should be in the range 0 to 100. A value of 0 will high end of the range to the low end, while a value of 100 will leave the value unchanged. A derived class will interpret the values in between so that the appearance is linear. Implemented in AxisModelLinear, and AxisModelLog. Referenced by CompositePlotter::setHighRange(). |
|
Sets the low end of the Range and returns the new Range. The parameter parm should be in the range 0 to 100. A value of 0 will leave the low end of the range unchanged, while a value of 100 will set it to value of the high. A derived class will interpret the values in between so that the appearance is linear. Implemented in AxisModelLinear, and AxisModelLog. Referenced by CompositePlotter::setLowRange(). |
|
Returns a copy of the object.
Implemented in AxisModelLinear, and AxisModelLog. Referenced by CompositePlotter::CompositePlotter(). |
|
Returns the value for the first tick step.
Definition at line 87 of file AxisModelBase.cxx. References m_first_tick. Referenced by LogTransform::genTicks(), LinearTransform::genTicks(), Lambert::genTicks(), and HammerAito::genTicks(). |
|
Definition at line 127 of file AxisModelBase.cxx. References 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 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 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 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 m_scale_factor, and 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 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 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 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 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 m_auto_ticks. Referenced by AxisModelXML::setAttributes(). |
|
Returns a boolean describing the type of the scale of the axis. False for the linear scale and true for the logarithmic one. Implemented in AxisModelLinear, and AxisModelLog. Referenced by AxisRepBase::drawXTickLabels(), AxisRepBase::drawYTickLabels(), AxisRepColor::drawZTickLabels(), AxisModelXML::setAttributes(), DisplayController::setAxisModel(), DisplayController::setBinner(), ProfileProjector::setRange(), Profile2DProjector::setRange(), Hist2DProjImp::setRange(), Hist1DProjImp::setRange(), and setRange(). |
|
Returns
Use this member instead of testing against Definition at line 269 of file AxisModelBase.cxx. References m_scaling_on. Referenced by DyHist1DProjector::getYLabel(), and Hist2DProjImp::getZLabel(). |
|
Returns
The base class implementation returns Reimplemented in AxisModelLinear. Definition at line 117 of file AxisModelBase.cxx. References m_use_pmag. Referenced by AxisRepBase::drawXTickLabels(), AxisRepBase::drawYTickLabels(), and AxisRepColor::drawZTickLabels(). |
|
Sets the auto-ranging flag to flag.
Definition at line 246 of file AxisModelBase.cxx. References 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 m_auto_ticks. |
|
Sets the range to empty.
Definition at line 226 of file AxisModelBase.cxx. References 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 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 m_range, and Range::setIntersect(). Referenced by LogTransform::adjustValues(), LinearTransform::adjustValues(), AxisModelLog::adjustValues(), AxisModelLinear::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 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 adjustLogValues(), Range::high(), isLog(), Range::length(), Range::low(), m_empty, m_range, m_scale_factor, and Range::pos(). |
|
Sets the Range to the low and high values.
Definition at line 165 of file AxisModelBase.cxx. References m_range, Range::setRange(), and std::swap(). Referenced by LogTransform::adjustLogValues(), AxisModelLog::adjustLogValues(), LinearTransform::adjustValues(), AxisModelLinear::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 m_range, and Range::setPos(). Referenced by DisplayController::setAxisModel(). |
|
Sets the magnitude of the range.
Definition at line 97 of file AxisModelBase.cxx. References 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 m_scale_factor, and 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 m_scale_factor, and 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 m_ticks. |
|
Sets the tick step.
Definition at line 72 of file AxisModelBase.cxx. References 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 m_empty, 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 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 m_is_dragging, m_range, and m_start_range. Referenced by AxisModelLog::calcHigh(), AxisModelLinear::calcHigh(), AxisModelLog::calcLow(), and AxisModelLinear::calcLow(). |
|
The auto-range flag.
When set Definition at line 51 of file AxisModelBase.h. Referenced by isAutoRanging(), and setAutoRanging(). |
|
A flag set to
Definition at line 103 of file AxisModelBase.h. Referenced by isAutoTicks(), and setAutoTicks(). |
|
A flag to indicate whether the range is empty.
Definition at line 54 of file AxisModelBase.h. Referenced by setEmpty(), setRange(), and setUnionRange(). |
|
The position of the first tick.
Definition at line 68 of file AxisModelBase.h. Referenced by getFirstTick(), and setFirstTick(). |
|
The current dragging state.
Definition at line 47 of file AxisModelBase.h. Referenced by startDragging(). |
|
Definition at line 81 of file AxisModelBase.h. Referenced by getLabelLocation(). |
|
The maximum number of ticks.
Definition at line 75 of file AxisModelBase.h. Referenced by 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(), getPMag(), setPMag(), and AxisModelLog::setTickStep(). |
|
The current range of the axis.
Definition at line 36 of file AxisModelBase.h. Referenced by AxisModelLog::adjustLogValues(), AxisModelLog::adjustValues(), AxisModelLinear::adjustValues(), AxisModelLog::calcHigh(), AxisModelLinear::calcHigh(), AxisModelLog::calcLow(), AxisModelLinear::calcLow(), getRange(), setIntersectRange(), setRange(), setRangePos(), setUnionRange(), and 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 getRMag(), 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(), getRange(), getScaleFactor(), setRange(), setScaleFactor(), and setScaling(). |
|
Definition at line 82 of file AxisModelBase.h. Referenced by getScaleLocation(). |
|
The scaled range.
Definition at line 39 of file AxisModelBase.h. Referenced by getRange(). |
|
If
Definition at line 63 of file AxisModelBase.h. Referenced by getScaleFactor(), isScaling(), setScaleFactor(), and 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(), AxisModelLinear::calcHigh(), AxisModelLog::calcLow(), AxisModelLinear::calcLow(), and 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 getTickStep(), AxisModelLog::setTickStep(), and setTickStep(). |
|
The list of generated ticks.
Definition at line 98 of file AxisModelBase.h. Referenced by getTicks(), and 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 AxisModelLinear::needPMag(), needPMag(), and setUsePMag(). |