Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

XyPlotter Class Reference

#include <XyPlotter.h>

Inheritance diagram for XyPlotter:

Inheritance graph
[legend]
Collaboration diagram for XyPlotter:

Collaboration graph
[legend]
List of all members.

Detailed Description

A Plotter class that plots points in 2 dimensions and option a third dimension in color.

It draws the X and Y axis. It is a CompositePlotter; therefore, it can plot multiple sets of data points in the same space. It can also plot multiple functions and other kinds of representations.

Bug:
Need a way to show invalid range for static histograms.

Bug:
When not using auto ticks, and changing the high range slider to lower values, the ticks draw outside their area.
Use auto_xytuple.py to see it.

Todo:
When multiple DataRep objects are contained by the plotter, one could set the title from one of them.

Author:
Kaustuv <kaustuv@stanford.edu>

Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Sanket B. Malde <sanket@stanford.edu>

Oded Wurman <owurman@stanford.edu>

Definition at line 43 of file XyPlotter.h.

Public Types

typedef void(hippodraw::Observer::* Action )(const Observable *)
 The member function of the Observer that is called.
typedef std::list< hippodraw::Observer * > ObserverList_t
 The type of STL container to maintain list of Observer objects.

Public Member Functions

virtual int activePlotIndex () const
 Returns the index of the active DataRep object.
virtual ProjectorBaseactiveProjector () const
 Returns the active projector.
virtual void addDataRep (DataRep *rep)
 Adds the DataRep object to the plotter.
virtual void addDataRepStacked (DataRep *rep)
 Adds the DataRep object to the plotter.
void addObserver (hippodraw::Observer *)
 Adds an Observer to the Observer list.
virtual void addValues (const std::vector< double > &v)
 Adds data values to the plot.
virtual void autoScale ()
 Sets the Range on each axis that has the auto range flag set to include all the data.
virtual void checkAxisScaling ()
 Check if Axis needs to be scaled or not.
PlotterBaseclone ()
 The clone function returns an object of its own kind which is a copy of this object at this moment.
virtual NTuplecreateNTuple () const
 Creates an NTuple representation of the plotted data.
virtual NTuplecreatePickTuple ()
 Creates a NTuple for a PickTable.
int currentView () const
 Return the current view index.
void deleteView (int index)
 Delete a view by index.
virtual void drawCrossHairs (ViewBase *view)
 Draws cross-hairs.
virtual void drawIn (ViewBase *view)
 Starts the drawing in view view.
virtual void drawProjValues (ViewBase *view)
 Draws the projected values.
virtual bool errorDisplay (hippodraw::Axes::Type axis) const
 Returns the state of error bar display on specified axis.
void fillCutList (std::vector< const TupleCut * > &cuts) const
 Fills the cuts vector with the TupleCuts contained by the DataRep objects.
virtual void fillPickedPoint (double mx, double my, std::vector< double > &picked) const
 Fills the picked data point.
virtual double getAspectRatio () const
 Returns the aspect ratio.
virtual AxisModelBasegetAxisModel (hippodraw::Axes::Type axis) const
 Returns the AxisModelBase derived class for the specified axis.
double getBinWidth (const std::string &axis) const
 Returns the bin width.
virtual double getBinWidth (hippodraw::Axes::Type) const
 Returns the bins with of the target DataRep object.
virtual bool getCurrentRangeSaved ()
 Returns current_range_saved member t.
virtual DataRepgetDataRep (int index) const
 Returns the DataRep object at index.
virtual double getHighRangeOnX () const
 Returns the high end of the X axis range.
virtual const std::stringgetInternalLabel (hippodraw::Axes::Type axis) const
 Returns the internal label.
virtual const std::stringgetInternalTitle () const
 Returns the internal title.
virtual const std::stringgetLabel (hippodraw::Axes::Type) const
 Returns the label for the specified axis.
virtual double getLowRangeOnX () const
 Returns the low end of the X axis range.
HippoRectangle getMarginRect () const
 Returns the margin space where drawing takes place.
virtual int getNumberOfEntries () const
 Returns the number of entries in the contained DataRep.
virtual int getNumDataReps () const
 Returns the number of DataRep objects contained by the plotter.
int getNumOfEntries () const
 Returns the number of entries in the contained DataRep.
const ObserverList_tgetObservers () const
 Returns the list of observers.
double getOffset (const std::string &axis) const
 Returns the offset on designated axis, similarly to getBinWidth.
virtual double getOffset (hippodraw::Axes::Type axis) const
 Returns the offset on designated axis, similarly to getBinWidth.
virtual int getParentDataRepIndex () const
 Returns the index of the parent DataRep.
virtual PlotterBasegetParentPlotter () const
 Returns the parent plotter.
virtual double getPosRange (hippodraw::Axes::Type axis) const
 Returns the smallest positive number from the data.
virtual ProjectorBasegetProjector (int i) const
 Returns the i-th projector.
virtual const RangegetRange (hippodraw::Axes::Type axis, bool scaled) const
 Returns the range on the specified axis.
virtual DataRepgetTarget () const
 Returns the selected DataRep.
const std::stringgetTitle () const
 Gets the title to be displayed.
virtual TransformBasegetTransform () const
 Returns the transform object used by the plotter.
const HippoRectanglegetUserRect () const
 Returns the data space rectangle.
virtual const BinToColorgetValueRep () const
 Returns the value to color representation.
virtual double getZValue (double x, double y, bool scaled=true) const
 Get the z value at the specified point (x,y).
bool hasAutoScaled () const
 Returns true if the axes have already been auto-scaled.
virtual bool hasAxis (hippodraw::Axes::Type axis) const
 Returns true if the plotter has an axis of specified type.
virtual bool hasNTupleBindings () const
 Returns true if the selected DataRep object has ntuple bindings, otherwise returns false.
virtual bool hasZoomY () const
 Returns true if the plotter has zoom feature on the Y axis otherwise it returns false.
virtual int indexOf (const DataRep *) const
 Returns the index of the selected DataRep object.
virtual bool isAutoRanging (hippodraw::Axes::Type axis) const
 Returns true if auto-ranging is enabled, otherwise returns false.
bool isTargetable () const
 Returns true if receiving object is target-able.
FontBaselabelFont (hippodraw::Axes::Type axes) const
 What font is being used to override the default while drawing axis label.
virtual double marginToInvertedUserY (double y) const
 Converts from inverted view coordinate to data coordinate, without taking into account transforms or scaling.
virtual double marginToUserX (double x) const
 Converts from view coordinate to data coordinate, without taking into account transforms or scaling.
virtual void marginToUserXY (double mx, double my, bool scaled, double &ux, double &uy) const
 Converts from the drawing space to the data space.
virtual double marginToUserY (double y) const
 Converts from view coordinate to data coordinate, without taking into account transforms or scaling.
virtual void matrixTranspose (bool yes)
 Transpose the X and Y axis of matrix representation.
const std::stringname () const
 Returns the name of the plotter.
int nextView (bool stepForward=true)
 Cycle through each set of plot ranges, thereby changing the view with each call.
virtual void notifyObservers () const
 Notifies Observer objects of a change.
int numViews () const
 Return the number of stored views.
virtual int plotterId () const
 The unique ID number of this plotter.
void prepareMarginRect (ViewBase *view)
 Prepares the margin rectangle.
virtual void removeDataRep (DataRep *rep)
 Removes the DataRep object from the plotter.
void removeObserver (hippodraw::Observer *)
 Removes an Observer from the Observer list.
virtual const ColorrepColor () const
 Returns the color used for the representation.
virtual RepBaserepresentation () const
 Returns the representation used by the plotter.
virtual void reset ()
 Resets the bins.
int saveView (const std::vector< double > &range_values)
 Save the current set of plot ranges which define a "view" for this plot.
int saveViewAtIndex (const std::vector< double > &range_values, unsigned int i)
 Save the current set of plot ranges which define a "view" for this plot.at the position i.
virtual DataRepselectedDataRep () const
 Returns the selected DataRep.
virtual void setActivePlot (int index, bool redraw)
 Sets the active plot.
void setAspectRatio (double ratio)
 Sets the aspect ratio.
virtual void setAutoRanging (const std::string &axis, bool flag)
 Sets the auto-ranging.
virtual void setAutoRanging (hippodraw::Axes::Type axis, bool flag)
 Sets the auto-ranging.
virtual void setAutoRanging (bool flag)
 Sets the auto-ranging status for all axes to flag.
virtual void setAutoTicks (const std::string &, bool on)
 Sets automatic ticks on or off.
virtual void setAutoTicks (hippodraw::Axes::Type axis, bool yes)
 Sets automatic generation of axis ticks.
virtual void setAutoTicksOnX (bool yes)
 Sets automatic generation of axis ticks on X axis.
virtual void setAxisModel (AxisModelBase *, hippodraw::Axes::Type)
 Sets the AxisModel on the specified axis.
virtual void setBinWidth (const std::string &axis, double width)
 Sets the bin width.
virtual void setBinWidth (hippodraw::Axes::Type axis, double width)
 Sets the bin width.
void setCrossX (double val)
 Set the crossX value.
void setCrossY (double val)
 Set the crossY value.
virtual void setCurrentRangeSaved (bool flag)
 Sets current_range_saved member to flag.
virtual void setCutEnabled (unsigned int i, bool yes=true)
 Sets the TupleCut object index by i to be enabled.
virtual void setCutInverted (unsigned int i, bool yes=true)
 Sets the TupleCut object indexed by i to be inverted.
virtual void setCutRangeAt (const Range &range, unsigned int i)
 Sets the Range of the TupleCut object indexed by i.
virtual void setEnableZ (bool yes=true)
 Sets the display of the Z axis on.
virtual void setErrorDisplay (hippodraw::Axes::Type axis, bool)
 Sets the display of the error bars on or off.
virtual void setHighRange (hippodraw::Axes::Type axis, int parm, bool dragging)
 Sets the high end of the Range of data displayed.
virtual void setLabel (const std::string &axis, const std::string &label)
 Sets the label of specified axis to label.
virtual void setLabel (hippodraw::Axes::Type, const std::string &value)
 Sets the label of the specified axis to value.
void setLabelFont (FontBase *font, hippodraw::Axes::Type axes)
 Set the font to be used to override the default while drawing axis label.
virtual void setLowRange (hippodraw::Axes::Type axis, int parm, bool dragging)
 Sets the low end of the Range of data displayed.
virtual void setNumberOfBins (const std::string &axis, unsigned int number)
 Sets the number of bins.
virtual void setNumberOfBins (hippodraw::Axes::Type axis, unsigned int number)
 Sets the number of bins.
virtual void setOffset (const std::string &axis, double offset)
 Sets the bin offset.
virtual void setOffset (hippodraw::Axes::Type axis, double offset)
 Sets the offset.
virtual void setOffsets (double xoffset, double yoffset)
 Sets the offsets on the x and y axis.
virtual void setParentDataRepIndex (int index)
 Sets the index of the parent DataRep.
virtual void setParentPlotter (PlotterBase *plotter)
 Sets the parent plotter.
void setRange (const std::string &axis, double low, double high)
 Sets the range on the specified axis.
virtual void setRange (hippodraw::Axes::Type axis, const Range &range, bool scaled=false, bool adjust_width=true)
 Sets the range on the specified axis.
virtual void setRepColor (const Color &)
 Sets the representation's color.
virtual void setRepresentation (RepBase *pointrep)
 Sets the representation.
virtual void setScaling (hippodraw::Axes::Type axis, bool on=true)
 Sets the scaling attribute of the AxisModelBase object.
virtual void setTicks (const std::string &axis, const std::vector< double > &values, const std::vector< std::string > &labels)
 Sets the ticks on specified axis.
virtual void setTicks (hippodraw::Axes::Type axis, const std::vector< AxisTick > &ticks)
 Sets the ticks for the specified axis.
virtual void setTicksOnX (const std::vector< double > &values, const std::vector< std::string > &labels)
 Sets the ticks for the X axis.
void setTitle (const std::string &title)
 Sets the title to be displayed.
void setTitleFont (FontBase *font)
 Set the font to be used to override the default while drawing title.
virtual void setTransform (TransformBase *)
 Sets the transform object and redraws.
virtual void setValueRep (BinToColor *rep)
 Sets the object that will do the value to color transform, if any.
void setView (int index)
 Set the view by index.
const FontBasetitleFont () const
 What font is being used to override the default while drawing title of plot.
void toggleActivePlot ()
 Toggles the active DataRep, if 2 or more are contained by the plotter.
virtual void update (const Observable *)
 Sends notification to it's Observer ViewBase object that redrawing is needed.
virtual void update ()
 Updates the plotter.
virtual float userToInvertedMarginY (double y) const
 Converts the user Y coordinate into the top-left based margin Y coordinate.
virtual float userToMarginColor (double c) const
 Converts the user Z coordinate into the margin color (X) coordinate.
virtual float userToMarginX (double x) const
 Converts the user X coordinate into the margin X coordinate.
virtual float userToMarginY (double y) const
 Converts the user Y coordinate into the margin Y coordinate.
virtual bool wantsPixmap () const
 Returns true.
virtual void willDelete (const Observable *)
 Notifies this Observer object that one of its Observable objects is about to be deleted.
 XyPlotter (const XyPlotter &plotter)
 The copy constructor.
 XyPlotter (const std::string &name="XyPlotter")
 The default constructor.
virtual ~XyPlotter ()
 The destructor.

Protected Member Functions

void calcAxisRatios (const CompositePlotter *)
 Calculates the ratio of view and data scales.
TupleCutgetCutAt (unsigned int i)
 Returns the TupleCut object at position i.
void notifyObservers (Action action) const
 An internal method to iterate over all observers and to send the message action.

Protected Attributes

bool current_range_saved
 Returns true if the current range on the axes have been saved.
double m_aspect_ratio
 The aspect ratio.
AxisRepBasem_axis_rep
 The axes model graphical representation.
double m_crossX
 The x position of the cross hair.
double m_crossY
 The y position of the cross hair.
int m_currentView
 Index of the current view.
HippoRectangle m_margin_rect
 The rectangle area in which the projected points are plotted.
std::string m_name
 The name of the type of plotter.
int m_parent_datarep_index
 Parent DataRep index.
PlotterBasem_parent_plotter
 Parent plotter.
CompositePlotterm_plotter
 The currently active plotter that draws the data points.
int m_plotterId
 A unique plotter id.
std::string m_title
 The main label; the title of the plot.
HippoRectangle m_user_rect
 The abstract data space.
std::vector< std::vector<
double > > 
m_views
 A vector of x and y ranges to be used as a circular buffer allowing one to cycle through the saved plot "views".
double m_z_ratio
 The conversion ratio from the user coordinate system to the view's coordinate system along the color axis.

Static Protected Attributes

static int s_plotters
 Reference count for creating plotter ids.

Private Types

typedef std::vector< CompositePlotter * > PlotterList_t
 The type of standard C++ container to hold CompositePlotter objects.

Private Member Functions

void checkAutoScale ()
 Checks if auto scaling is required and does an auto scale on contained plotters as needed.
void prepareToDraw ()
 Prepares for drawing.

Private Attributes

int m_active_index
 Index to the active plotter.
PlotterList_t m_plotters
 The list of CompositePlotter objects contained by this plotter.
double m_x_ratio
 The conversion ratio from the user coordinate system to the view's coordinate system along the X axis.
double m_y_ratio
 The conversion ratio from the user coordinate system to the view's coordinate system along the Y axis.


Member Typedef Documentation

typedef void( hippodraw::Observer::* Observable::Action)(const Observable *) [inherited]
 

The member function of the Observer that is called.

Definition at line 83 of file Observable.h.

typedef std::list< hippodraw::Observer * > Observable::ObserverList_t [inherited]
 

The type of STL container to maintain list of Observer objects.

Definition at line 46 of file Observable.h.

typedef std::vector< CompositePlotter * > XyPlotter::PlotterList_t [private]
 

The type of standard C++ container to hold CompositePlotter objects.

Definition at line 50 of file XyPlotter.h.


Constructor & Destructor Documentation

XyPlotter::XyPlotter const std::string name = "XyPlotter"  ) 
 

The default constructor.

Definition at line 48 of file XyPlotter.cxx.

References m_axis_rep, m_plotter, and m_plotters.

Referenced by clone().

XyPlotter::XyPlotter const XyPlotter plotter  ) 
 

The copy constructor.

Definition at line 56 of file XyPlotter.cxx.

References clone(), m_axis_rep, m_plotter, and m_plotters.

XyPlotter::~XyPlotter  )  [virtual]
 

The destructor.

Definition at line 65 of file XyPlotter.cxx.

References m_axis_rep, and m_plotters.


Member Function Documentation

int XyPlotter::activePlotIndex  )  const [virtual]
 

Returns the index of the active DataRep object.

Reimplemented from PlotterBase.

Definition at line 303 of file XyPlotter.cxx.

References m_active_index.

ProjectorBase * XyPlotter::activeProjector  )  const [virtual]
 

Returns the active projector.

Reimplemented from PlotterBase.

Definition at line 649 of file XyPlotter.cxx.

References m_plotter.

Referenced by createNTuple().

void XyPlotter::addDataRep DataRep rep  )  [virtual]
 

Adds the DataRep object to the plotter.

Adds the DataRep object to the plotter by sharing the current X and Y axes.

Reimplemented from PlotterBase.

Reimplemented in Cut1DPlotter, and Cut2DPlotter.

Definition at line 310 of file XyPlotter.cxx.

References Observable::addObserver(), getNumDataReps(), m_active_index, m_plotter, and Observable::notifyObservers().

Referenced by Cut2DPlotter::addDataRep(), Cut1DPlotter::addDataRep(), and addDataRepStacked().

void XyPlotter::addDataRepStacked DataRep rep  )  [virtual]
 

Adds the DataRep object to the plotter.

Adds the DataRep object to the plotter by sharing the current X axis, but with its own Y axis.

Definition at line 324 of file XyPlotter.cxx.

References addDataRep(), getAxisModel(), m_active_index, m_plotter, m_plotters, Observable::notifyObservers(), setAxisModel(), and hippodraw::Axes::X.

void Observable::addObserver hippodraw::Observer  )  [inherited]
 

Adds an Observer to the Observer list.

Definition at line 49 of file Observable.cxx.

References Observable::m_list.

Referenced by CutPlotter::addCutTarget(), addDataRep(), FunctionRep::FunctionRep(), BinningProjector::normalizeTo(), DataRepController::setAxisBindings(), DisplayController::setNTuple(), CutPlotter::setNTuple(), and TextPlotter::setParentDataRep().

void XyPlotter::addValues const std::vector< double > &  v  )  [virtual]
 

Adds data values to the plot.

This method is provided as a convenience when the plotter contains a single DataRep that responds to addValues. For example a static histogram would respond to it.

Reimplemented from PlotterBase.

Definition at line 817 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::autoScale  )  [virtual]
 

Sets the Range on each axis that has the auto range flag set to include all the data.

This function scrolls through all the points plotters, asking for their preferred ranges. It then sets the range to be the union of all of those.

Reimplemented from PlotterBase.

Definition at line 349 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

Referenced by checkAutoScale(), and CutPlotter::setAxisBinding().

void XyPlotter::calcAxisRatios const CompositePlotter  )  [protected]
 

Calculates the ratio of view and data scales.

Calculates and set the appropriate data members the ratio of the view and data scales.

Definition at line 580 of file XyPlotter.cxx.

References HippoRectangle::getDepth(), HippoRectangle::getHeight(), HippoRectangle::getWidth(), hasAxis(), PlotterBase::m_margin_rect, m_plotter, PlotterBase::m_user_rect, m_x_ratio, m_y_ratio, m_z_ratio, and hippodraw::Axes::Z.

Referenced by drawIn(), and drawProjValues().

void XyPlotter::checkAutoScale  )  [private]
 

Checks if auto scaling is required and does an auto scale on contained plotters as needed.

Definition at line 81 of file XyPlotter.cxx.

References autoScale(), getAxisModel(), hasAxis(), isAutoRanging(), m_plotters, num_util::size(), hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by drawIn().

void XyPlotter::checkAxisScaling  )  [virtual]
 

Check if Axis needs to be scaled or not.

Reimplemented from PlotterBase.

Definition at line 633 of file XyPlotter.cxx.

References m_plotter.

PlotterBase * XyPlotter::clone  )  [virtual]
 

The clone function returns an object of its own kind which is a copy of this object at this moment.

Implements PlotterBase.

Reimplemented in Cut1DPlotter, and Cut2DPlotter.

Definition at line 74 of file XyPlotter.cxx.

References XyPlotter().

Referenced by XyPlotter().

NTuple * XyPlotter::createNTuple  )  const [virtual]
 

Creates an NTuple representation of the plotted data.

Derived classes should create a representation appropriate for their plotting. The NTuple should contain the coordinates, the error on the coordinates, the values and the error on the values.

Implements PlotterBase.

Definition at line 191 of file XyPlotter.cxx.

References activeProjector(), getLabel(), hasAxis(), m_plotter, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

NTuple * XyPlotter::createPickTuple  )  [virtual]
 

Creates a NTuple for a PickTable.

Creates an NTuple appropriate for a PickTable for this plotter. For plotters derived from this class the first three column labels and subsequent labels are as follows

  • "Item number"
  • The X axis label.
  • The Y axis label.
  • For 2D plots with Y axis scaling, the 4th label is "Density"
  • For 3D plots the 4th label is the Z axis label.
  • For 3D plots with Z axis scaling, the 5th label is "Density"
See also:
fillPickTuple.

Reimplemented from PlotterBase.

Definition at line 444 of file XyPlotter.cxx.

References PlotterBase::getTitle(), m_plotter, PlotterBase::name(), and PlotterBase::setTitle().

int PlotterBase::currentView  )  const [inherited]
 

Return the current view index.

Definition at line 829 of file PlotterBase.cxx.

References PlotterBase::m_currentView.

Referenced by QtDisplay::currentView().

void PlotterBase::deleteView int  index  )  [inherited]
 

Delete a view by index.

Definition at line 812 of file PlotterBase.cxx.

References PlotterBase::m_views, and PlotterBase::setView().

Referenced by QtDisplay::deleteView().

void XyPlotter::drawCrossHairs ViewBase view  )  [virtual]
 

Draws cross-hairs.

Draws cross-hairs at the mouse hot spot. The drawing is done at the X and Y position set by setCrossX and setCrossY.

Reimplemented from PlotterBase.

Definition at line 177 of file XyPlotter.cxx.

References AxisRepBase::drawCrossHairs(), getTransform(), m_axis_rep, PlotterBase::m_crossX, and PlotterBase::m_crossY.

void XyPlotter::drawIn ViewBase view  )  [virtual]
 

Starts the drawing in view view.

This is the initial method that is called.

Implements PlotterBase.

Definition at line 155 of file XyPlotter.cxx.

References AxisRepBase::beginPlot(), calcAxisRatios(), checkAutoScale(), drawProjValues(), AxisRepBase::drawTitle(), PlotterBase::getTitle(), m_active_index, m_axis_rep, m_plotter, m_plotters, PlotterBase::m_title, PlotterBase::m_user_rect, prepareMarginRect(), and prepareToDraw().

void XyPlotter::drawProjValues ViewBase view  )  [virtual]
 

Draws the projected values.

This implementation invokes drawProjValues on each of the DataRep objects in the composite. If multiple DataRep objects exist in the composite and one is selected (active), it is the one that is drawn last.

Definition at line 593 of file XyPlotter.cxx.

References calcAxisRatios(), and m_plotters.

Referenced by drawIn().

bool XyPlotter::errorDisplay hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the state of error bar display on specified axis.

Implements PlotterBase.

Definition at line 559 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::fillCutList std::vector< const TupleCut * > &  cuts  )  const [virtual]
 

Fills the cuts vector with the TupleCuts contained by the DataRep objects.

Reimplemented from PlotterBase.

Definition at line 931 of file XyPlotter.cxx.

References m_plotters.

Referenced by getCutAt().

void XyPlotter::fillPickedPoint double  mx,
double  my,
std::vector< double > &  picked
const [virtual]
 

Fills the picked data point.

Fills the vector picked with the picked data set. The vector will be cleared before insertion of coordinates. The resulting size of the vector depends on the type of DataRep in use and the contents is as follows.

  • 2D plots without Y axis scaling: 0., X, Y
  • 2D plots with Y axis scaling: 1., X, Y-scaled, Y
  • 3D plots without Z axis scaling: 2., X, Y, Z
  • 3D plots with Z axis scaling: 3., X, Y, Z-scaled, Z
The first item is used to identify the type of picked point.
See also:
createPickNTuple.

Reimplemented from PlotterBase.

Definition at line 459 of file XyPlotter.cxx.

References m_plotter, marginToInvertedUserY(), and marginToUserX().

double XyPlotter::getAspectRatio  )  const [virtual]
 

Returns the aspect ratio.

The aspect ratio is the ratio of the width to the height that should be used when drawing the plotter. If the aspect ratio has been set to a non-zero value, the return that ratio. Otherwise, return the aspect ratio preferred by the contained TransformBase object.

Reimplemented from PlotterBase.

Definition at line 496 of file XyPlotter.cxx.

References PlotterBase::m_aspect_ratio, m_plotters, and num_util::size().

Referenced by prepareMarginRect().

AxisModelBase * XyPlotter::getAxisModel hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the AxisModelBase derived class for the specified axis.

Reimplemented from PlotterBase.

Definition at line 538 of file XyPlotter.cxx.

References m_plotter.

Referenced by addDataRepStacked(), and checkAutoScale().

double PlotterBase::getBinWidth const std::string axis  )  const [inherited]
 

Returns the bin width.

The implementation in the base class converts the string to an hippodraw::Axes::Type and calls the virtual function getBinWidth ( hippodraw::Axes::Type );. It is declared as a convenience to the developer since bin width is a common attribute.

Definition at line 428 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), PlotterBase::getBinWidth(), and num_util::type().

double XyPlotter::getBinWidth hippodraw::Axes::Type   )  const [virtual]
 

Returns the bins with of the target DataRep object.

Reimplemented from PlotterBase.

Definition at line 766 of file XyPlotter.cxx.

References m_plotter.

bool PlotterBase::getCurrentRangeSaved  )  [virtual, inherited]
 

Returns current_range_saved member t.

Definition at line 857 of file PlotterBase.cxx.

References PlotterBase::current_range_saved.

TupleCut * XyPlotter::getCutAt unsigned int  i  )  [protected]
 

Returns the TupleCut object at position i.

Definition at line 942 of file XyPlotter.cxx.

References fillCutList().

Referenced by setCutEnabled(), setCutInverted(), and setCutRangeAt().

DataRep * XyPlotter::getDataRep int  index  )  const [virtual]
 

Returns the DataRep object at index.

Reimplemented from PlotterBase.

Definition at line 656 of file XyPlotter.cxx.

References getNumDataReps(), and m_plotters.

Referenced by getProjector(), getTarget(), isTargetable(), setCutEnabled(), setCutInverted(), and setCutRangeAt().

double PlotterBase::getHighRangeOnX  )  const [virtual, inherited]
 

Returns the high end of the X axis range.

Deprecated:
This method is only used by the SIP built Python extension module and is kept only for running experiments.

Definition at line 654 of file PlotterBase.cxx.

References PlotterBase::getRange(), Range::high(), and hippodraw::Axes::X.

const string & XyPlotter::getInternalLabel hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the internal label.

The internal label is either the label set by a client, or one of %x, %y, or %z for the corresponding axis. The later ones mean that the object should return the corresponding label of the DataSource. The implementation in this base class returns an empty string.

Reimplemented from PlotterBase.

Definition at line 824 of file XyPlotter.cxx.

References m_plotter.

const string & PlotterBase::getInternalTitle  )  const [virtual, inherited]
 

Returns the internal title.

The internal title is either the title set by a client, or %t. The later ones mean that the object should return the corresponding title of the DataSource, if bound to one.

Definition at line 289 of file PlotterBase.cxx.

References PlotterBase::m_title.

Referenced by PlotterBaseXML::createElement().

const string & XyPlotter::getLabel hippodraw::Axes::Type   )  const [virtual]
 

Returns the label for the specified axis.

Reimplemented from PlotterBase.

Definition at line 831 of file XyPlotter.cxx.

References m_plotter.

Referenced by createNTuple().

double PlotterBase::getLowRangeOnX  )  const [virtual, inherited]
 

Returns the low end of the X axis range.

Definition at line 645 of file PlotterBase.cxx.

References PlotterBase::getRange(), Range::low(), and hippodraw::Axes::X.

HippoRectangle PlotterBase::getMarginRect  )  const [inherited]
 

Returns the margin space where drawing takes place.

Definition at line 405 of file PlotterBase.cxx.

References PlotterBase::m_margin_rect.

Referenced by ViewBase::getMarginRect(), QtViewImp::getMarginRect(), OpenGLView::toViewY(), and EpsView::toViewY().

int XyPlotter::getNumberOfEntries  )  const [virtual]
 

Returns the number of entries in the contained DataRep.

Reimplemented from PlotterBase.

Definition at line 846 of file XyPlotter.cxx.

References m_plotter.

int XyPlotter::getNumDataReps  )  const [virtual]
 

Returns the number of DataRep objects contained by the plotter.

Reimplemented from PlotterBase.

Definition at line 703 of file XyPlotter.cxx.

References m_plotters.

Referenced by addDataRep(), getDataRep(), getTarget(), indexOf(), isTargetable(), and setActivePlot().

int PlotterBase::getNumOfEntries  )  const [inherited]
 

Returns the number of entries in the contained DataRep.

Note:
This method is to workaround of SIP handling of virtual functions. It calls the virtual function getNumberOfEntries().

Definition at line 467 of file PlotterBase.cxx.

References PlotterBase::getNumberOfEntries().

const Observable::ObserverList_t & Observable::getObservers  )  const [inherited]
 

Returns the list of observers.

Definition at line 57 of file Observable.cxx.

References Observable::m_list.

double PlotterBase::getOffset const std::string axis  )  const [inherited]
 

Returns the offset on designated axis, similarly to getBinWidth.

Definition at line 451 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), PlotterBase::getOffset(), and num_util::type().

double XyPlotter::getOffset hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the offset on designated axis, similarly to getBinWidth.

Reimplemented from PlotterBase.

Definition at line 803 of file XyPlotter.cxx.

References m_plotter.

int PlotterBase::getParentDataRepIndex  )  const [virtual, inherited]
 

Returns the index of the parent DataRep.

Returns -1 if there exist none

Definition at line 554 of file PlotterBase.cxx.

References PlotterBase::m_parent_datarep_index.

Referenced by PlotterBaseXML::createElement().

PlotterBase * PlotterBase::getParentPlotter  )  const [virtual, inherited]
 

Returns the parent plotter.

Returns 0 if there exist none

Definition at line 564 of file PlotterBase.cxx.

References PlotterBase::m_parent_plotter.

Referenced by PlotterBaseXML::createElement(), and FunctionController::refreshEllipsoidDisplay().

double XyPlotter::getPosRange hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns the smallest positive number from the data.

Reimplemented from PlotterBase.

Definition at line 853 of file XyPlotter.cxx.

References m_plotter.

ProjectorBase * XyPlotter::getProjector int  i  )  const [virtual]
 

Returns the i-th projector.

Reimplemented from PlotterBase.

Definition at line 640 of file XyPlotter.cxx.

References getDataRep().

const Range & XyPlotter::getRange hippodraw::Axes::Type  axis,
bool  scaled
const [virtual]
 

Returns the range on the specified axis.

Returns the range of the data being plotted on the axis axis. If scaled is true, uses the scaled range.

See also:
AxisModelBase::getRange.

Reimplemented from PlotterBase.

Definition at line 788 of file XyPlotter.cxx.

References m_plotter.

Referenced by Cut2DPlotter::setCutRangeFull(), and Cut1DPlotter::setCutRangeFull().

DataRep * XyPlotter::getTarget  )  const [virtual]
 

Returns the selected DataRep.

Reimplemented from PlotterBase.

Definition at line 675 of file XyPlotter.cxx.

References getDataRep(), getNumDataReps(), isTargetable(), m_active_index, and m_plotters.

const string & PlotterBase::getTitle  )  const [inherited]
 

Gets the title to be displayed.

Definition at line 251 of file PlotterBase.cxx.

References PlotterBase::activePlotIndex(), PlotterBase::getDataRep(), and PlotterBase::m_title.

Referenced by createPickTuple(), drawIn(), QtDisplay::getTitle(), PlotTable::initialize(), and Inspector::updatePlotTab().

TransformBase * XyPlotter::getTransform  )  const [virtual]
 

Returns the transform object used by the plotter.

Reimplemented from PlotterBase.

Definition at line 810 of file XyPlotter.cxx.

References m_plotter.

Referenced by drawCrossHairs().

const HippoRectangle & PlotterBase::getUserRect  )  const [inherited]
 

Returns the data space rectangle.

Definition at line 400 of file PlotterBase.cxx.

References PlotterBase::m_user_rect.

Referenced by ViewBase::getUserRect().

const BinToColor * XyPlotter::getValueRep  )  const [virtual]
 

Returns the value to color representation.

If the Z value is represented graphically, then return the object that controls the binary value to graphic attribute.

Reimplemented from PlotterBase.

Definition at line 875 of file XyPlotter.cxx.

References m_plotter.

double PlotterBase::getZValue double  x,
double  y,
bool  scaled = true
const [virtual, inherited]
 

Get the z value at the specified point (x,y).

Returns 0.0. Derived classes that support Z coordinates should override this method and returns the z value of the point at x and y. If scaled is true, returns the z value multiplied by the scale factor, otherwise returns the true value.

Definition at line 484 of file PlotterBase.cxx.

bool XyPlotter::hasAutoScaled  )  const
 

Returns true if the axes have already been auto-scaled.

Reimplemented from PlotterBase.

Definition at line 606 of file XyPlotter.cxx.

References m_plotter.

bool XyPlotter::hasAxis hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns true if the plotter has an axis of specified type.

Reimplemented from PlotterBase.

Definition at line 860 of file XyPlotter.cxx.

References m_plotters.

Referenced by calcAxisRatios(), checkAutoScale(), createNTuple(), prepareMarginRect(), and wantsPixmap().

bool XyPlotter::hasNTupleBindings  )  const [virtual]
 

Returns true if the selected DataRep object has ntuple bindings, otherwise returns false.

Implements PlotterBase.

Reimplemented in CutPlotter.

Definition at line 626 of file XyPlotter.cxx.

References m_plotter.

bool XyPlotter::hasZoomY  )  const [virtual]
 

Returns true if the plotter has zoom feature on the Y axis otherwise it returns false.

Reimplemented from PlotterBase.

Definition at line 613 of file XyPlotter.cxx.

References m_plotters.

int XyPlotter::indexOf const DataRep  )  const [virtual]
 

Returns the index of the selected DataRep object.

Reimplemented from PlotterBase.

Definition at line 746 of file XyPlotter.cxx.

References getNumDataReps(), and m_plotters.

Referenced by CutPlotter::setAxisBinding().

bool XyPlotter::isAutoRanging hippodraw::Axes::Type  axis  )  const [virtual]
 

Returns true if auto-ranging is enabled, otherwise returns false.

Reimplemented from PlotterBase.

Definition at line 882 of file XyPlotter.cxx.

References m_plotter.

Referenced by checkAutoScale().

bool XyPlotter::isTargetable  )  const [virtual]
 

Returns true if receiving object is target-able.

Reimplemented from PlotterBase.

Definition at line 718 of file XyPlotter.cxx.

References std::count(), getDataRep(), getNumDataReps(), m_active_index, and m_plotters.

Referenced by getTarget().

FontBase * XyPlotter::labelFont hippodraw::Axes::Type  axes  )  const
 

What font is being used to override the default while drawing axis label.

If return value is null pointer the default is being used.

Definition at line 243 of file XyPlotter.cxx.

References m_axis_rep, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

Referenced by PlotterBaseXML::createFontElement().

double XyPlotter::marginToInvertedUserY double  y  )  const [virtual]
 

Converts from inverted view coordinate to data coordinate, without taking into account transforms or scaling.

Definition at line 426 of file XyPlotter.cxx.

References HippoRectangle::getHeight(), HippoRectangle::getY(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_y_ratio.

Referenced by fillPickedPoint().

double XyPlotter::marginToUserX double  x  )  const [virtual]
 

Converts from view coordinate to data coordinate, without taking into account transforms or scaling.

Definition at line 412 of file XyPlotter.cxx.

References HippoRectangle::getX(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_x_ratio.

Referenced by fillPickedPoint(), and marginToUserXY().

void XyPlotter::marginToUserXY double  mx,
double  my,
bool  scaled,
double &  ux,
double &  uy
const [virtual]
 

Converts from the drawing space to the data space.

Converts the drawing space coordinates mx and my, to the data space. The results are return via ux and uy. Applies the scale factor of an axis if scaled is true.

Implements PlotterBase.

Definition at line 434 of file XyPlotter.cxx.

References m_plotter, marginToUserX(), and marginToUserY().

double XyPlotter::marginToUserY double  y  )  const [virtual]
 

Converts from view coordinate to data coordinate, without taking into account transforms or scaling.

Definition at line 419 of file XyPlotter.cxx.

References HippoRectangle::getY(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_y_ratio.

Referenced by marginToUserXY().

void XyPlotter::matrixTranspose bool  yes  )  [virtual]
 

Transpose the X and Y axis of matrix representation.

If X-Y representation of is matrix represented as a vector with shape, then transpose the X and Y axis. Otherwise, do nothing.

Reimplemented from PlotterBase.

Definition at line 889 of file XyPlotter.cxx.

References m_plotter.

const string & PlotterBase::name  )  const [inherited]
 

Returns the name of the plotter.

See also:
m_name.

Definition at line 82 of file PlotterBase.cxx.

References PlotterBase::m_name.

Referenced by PlotterBaseXML::createElement(), and createPickTuple().

int PlotterBase::nextView bool  stepForward = true  )  [inherited]
 

Cycle through each set of plot ranges, thereby changing the view with each call.

Returns:
The index of the current view.
Parameters:
stepForward Direction to step through the views.

Definition at line 765 of file PlotterBase.cxx.

References PlotterBase::m_currentView, PlotterBase::m_views, and PlotterBase::setView().

Referenced by QtDisplay::nextView().

void Observable::notifyObservers Action  action  )  const [protected, inherited]
 

An internal method to iterate over all observers and to send the message action.

Definition at line 69 of file Observable.cxx.

References std::bind2nd(), std::for_each(), Observable::m_list, and std::mem_fun().

void Observable::notifyObservers  )  const [virtual, inherited]
 

Notifies Observer objects of a change.

If interval counting is disabled, then Observer::Update is sent immediately. If interval counting is enabled, then the current count is incremented. If the current count is equal to the interval count, then the Observer::update message is sent and the current count reset to 0.

Reimplemented in NTuple, FitsNTuple, RootNTuple, NumArrayTuple, ListTuple, and RootNTuple.

Definition at line 90 of file Observable.cxx.

References hippodraw::Observer::update().

Referenced by addDataRep(), addDataRepStacked(), FunctionController::addFunctionRep(), RTuple::addRow(), StHist2DProjector::addValues(), StHist1DProjector::addValues(), autoScale(), Inspector::contourLevelsTextBox_returnPressed(), Inspector::contourSlider_valueChanged(), Inspector::contourTextBox_returnPressed(), FunctionRep::fitFunction(), NumArrayTuple::notifyObservers(), NTuple::notifyObservers(), ListTuple::notifyObservers(), RootNTuple::notifyObservers(), FitsNTuple::notifyObservers(), removeDataRep(), FunctionRep::restoreParameters(), CutPlotter::setActive(), setAutoRanging(), QtDisplay::setContourLevels(), CutPlotter::setCutColor(), setCutEnabled(), setCutInverted(), setCutRangeAt(), ProjectorBase::setDirty(), DataRep::setErrorDisplay(), setHighRange(), setLabel(), PlotterBase::setLabel(), DataSource::setLabelAt(), DataSource::setLabels(), setLowRange(), DataSource::setName(), DisplayController::setNTuple(), FunctionRep::setParameters(), DataRep::setRepColor(), DyHistogram::setRepresentation(), DataRep::setRepresentation(), DataRep::setRepSize(), DataRep::setRepStyle(), setScaling(), PlotterBase::setTitle(), DataSource::setTitle(), setTransform(), setValueRep(), PlotterBase::update(), NTupleProjector::update(), DataRep::update(), CutPlotter::update(), BinningProjector::update(), CutPlotter::updateTargets(), DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().

int PlotterBase::numViews  )  const [inherited]
 

Return the number of stored views.

Definition at line 805 of file PlotterBase.cxx.

References PlotterBase::m_views.

Referenced by QtDisplay::numViews().

int PlotterBase::plotterId  )  const [virtual, inherited]
 

The unique ID number of this plotter.

Definition at line 718 of file PlotterBase.cxx.

References PlotterBase::m_plotterId.

Referenced by QtDisplay::plotterId().

void XyPlotter::prepareMarginRect ViewBase view  ) 
 

Prepares the margin rectangle.

Definition at line 111 of file XyPlotter.cxx.

References getAspectRatio(), ViewBase::getDrawRect(), HippoRectangle::getHeight(), HippoRectangle::getWidth(), hasAxis(), PlotterBase::m_margin_rect, HippoRectangle::setRect(), and hippodraw::Axes::Z.

Referenced by drawIn().

void XyPlotter::prepareToDraw  )  [private]
 

Prepares for drawing.

Prepare for drawing by setting the axis ranges if necessary.

Definition at line 144 of file XyPlotter.cxx.

References m_plotters, and num_util::size().

Referenced by drawIn().

void XyPlotter::removeDataRep DataRep rep  )  [virtual]
 

Removes the DataRep object from the plotter.

Reimplemented from PlotterBase.

Definition at line 341 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void Observable::removeObserver hippodraw::Observer  )  [inherited]
 

Removes an Observer from the Observer list.

Definition at line 63 of file Observable.cxx.

References Observable::m_list.

Referenced by BinningProjector::normalizeTo(), CutPlotter::removeFromTarget(), DisplayController::removeTextObservers(), NTupleProjector::setNTuple(), FunctionRep::willDelete(), FunctionRep::~FunctionRep(), and NTupleProjector::~NTupleProjector().

const Color & XyPlotter::repColor  )  const [virtual]
 

Returns the color used for the representation.

Implements PlotterBase.

Definition at line 573 of file XyPlotter.cxx.

References m_plotter.

RepBase * XyPlotter::representation  )  const [virtual]
 

Returns the representation used by the plotter.

Implements PlotterBase.

Definition at line 531 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::reset  )  [virtual]
 

Resets the bins.

Reimplemented from PlotterBase.

Definition at line 780 of file XyPlotter.cxx.

References m_plotter.

int PlotterBase::saveView const std::vector< double > &  range_values  )  [inherited]
 

Save the current set of plot ranges which define a "view" for this plot.

Returns:
index of the saved view.
Parameters:
range_values A vector of 4 elements containing the x and y ranges.

Definition at line 725 of file PlotterBase.cxx.

References PlotterBase::m_currentView, and PlotterBase::m_views.

Referenced by QtDisplay::saveView().

int PlotterBase::saveViewAtIndex const std::vector< double > &  range_values,
unsigned int  i
[inherited]
 

Save the current set of plot ranges which define a "view" for this plot.at the position i.

The views from position i onwards are deleted

Returns:
index of the saved view.
Parameters:
range_values A vector of 4 elements containing the x and y ranges.
i the position at which range_values should be inserted at.

Definition at line 740 of file PlotterBase.cxx.

References PlotterBase::m_currentView, and PlotterBase::m_views.

DataRep * XyPlotter::selectedDataRep  )  const [virtual]
 

Returns the selected DataRep.

That is, the one that should receive commands to it. If multiple DataRep objects are selected, return a null pointer.

Reimplemented from PlotterBase.

Definition at line 896 of file XyPlotter.cxx.

References m_plotter.

Referenced by CutPlotter::setAxisBinding(), and CutPlotter::setNTuple().

void XyPlotter::setActivePlot int  index,
bool  redraw
[virtual]
 

Sets the active plot.

If index is non-negative, sets the active plot, to the one indexed by index, while setting the others, if any, to inactive state. If index is negative, set all plots to be active. If redraw is true, then redraws all plots.

Reimplemented from PlotterBase.

Definition at line 273 of file XyPlotter.cxx.

References getNumDataReps(), m_active_index, m_plotter, and m_plotters.

void PlotterBase::setAspectRatio double  ratio  )  [inherited]
 

Sets the aspect ratio.

Set the ratio of the width to the height that should be used when drawing the plotter. A value of 0.0 indicates that any ratio is acceptable.

Definition at line 522 of file PlotterBase.cxx.

References PlotterBase::m_aspect_ratio.

Referenced by FitsController::checkForImage(), and QtDisplay::setAspectRatio().

void PlotterBase::setAutoRanging const std::string axis,
bool  flag
[virtual, inherited]
 

Sets the auto-ranging.

Sets auto-ranging status for the axis to flag and auto-ranges all axis which has that status set.

Definition at line 201 of file PlotterBase.cxx.

References PlotterBase::autoScale(), and hippodraw::Axes::convert().

Referenced by Inspector::axisZoomPanCheckBox_clicked(), QtDisplay::resize(), QtDisplay::setAutoRanging(), DisplayController::setAxisBindings(), DisplayController::setBinWidth(), Inspector::setHighRange(), Inspector::setLowRange(), DisplayController::setOffset(), and DisplayController::setRange().

void XyPlotter::setAutoRanging hippodraw::Axes::Type  axis,
bool  flag
[virtual]
 

Sets the auto-ranging.

Sets auto-ranging status for the axis to flag and auto-ranges all axis which has that status set. Redraws the plot.

Reimplemented from PlotterBase.

Definition at line 373 of file XyPlotter.cxx.

References m_plotter, Observable::notifyObservers(), and setAutoRanging().

void XyPlotter::setAutoRanging bool  flag  )  [virtual]
 

Sets the auto-ranging status for all axes to flag.

Sets the auto-ranging status for all axes to flag and re-draws.

Reimplemented from PlotterBase.

Definition at line 365 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

Referenced by setAutoRanging().

void PlotterBase::setAutoTicks const std::string ,
bool  on
[virtual, inherited]
 

Sets automatic ticks on or off.

Definition at line 603 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), PlotterBase::setAutoTicks(), and num_util::type().

void XyPlotter::setAutoTicks hippodraw::Axes::Type  axis,
bool  yes
[virtual]
 

Sets automatic generation of axis ticks.

Reimplemented from PlotterBase.

Definition at line 903 of file XyPlotter.cxx.

References m_plotter.

void PlotterBase::setAutoTicksOnX bool  yes  )  [virtual, inherited]
 

Sets automatic generation of axis ticks on X axis.

This base class does nothing. Derived classes may interpret this function.

Note:
This member function is temporary fix to memory leak problem in passing string with SIP.

Definition at line 596 of file PlotterBase.cxx.

References PlotterBase::setAutoTicks(), and hippodraw::Axes::X.

void XyPlotter::setAxisModel AxisModelBase ,
hippodraw::Axes::Type 
[virtual]
 

Sets the AxisModel on the specified axis.

Also, sets the same AxisModel to all of the contained plotters.

Implements PlotterBase.

Definition at line 545 of file XyPlotter.cxx.

References m_plotter.

Referenced by addDataRepStacked().

void PlotterBase::setBinWidth const std::string axis,
double  width
[virtual, inherited]
 

Sets the bin width.

Sets the bin width parameter of the plot. Not all plots have a bin width parameter. Since histogram-ming plots are commonly used, this method has been declared as a convenience to script writers. The implementation is this base class does nothing.

Definition at line 369 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), and PlotterBase::setBinWidth().

void XyPlotter::setBinWidth hippodraw::Axes::Type  axis,
double  width
[virtual]
 

Sets the bin width.

Sets the bin width of the contained ProjectorBase objects to width along axis axis.

Reimplemented from PlotterBase.

Definition at line 773 of file XyPlotter.cxx.

References m_plotter.

void PlotterBase::setCrossX double  val  )  [inherited]
 

Set the crossX value.

Definition at line 489 of file PlotterBase.cxx.

References PlotterBase::m_crossX.

Referenced by QtViewImp::setCrossX().

void PlotterBase::setCrossY double  val  )  [inherited]
 

Set the crossY value.

Definition at line 494 of file PlotterBase.cxx.

References PlotterBase::m_crossY.

Referenced by QtViewImp::setCrossY().

void PlotterBase::setCurrentRangeSaved bool  flag  )  [virtual, inherited]
 

Sets current_range_saved member to flag.

Definition at line 850 of file PlotterBase.cxx.

References PlotterBase::current_range_saved.

Referenced by CanvasView::contentsMouseReleaseEvent().

void XyPlotter::setCutEnabled unsigned int  i,
bool  yes = true
[virtual]
 

Sets the TupleCut object index by i to be enabled.

Definition at line 979 of file XyPlotter.cxx.

References getCutAt(), getDataRep(), and Observable::notifyObservers().

void XyPlotter::setCutInverted unsigned int  i,
bool  yes = true
[virtual]
 

Sets the TupleCut object indexed by i to be inverted.

Definition at line 966 of file XyPlotter.cxx.

References getCutAt(), getDataRep(), and Observable::notifyObservers().

void XyPlotter::setCutRangeAt const Range range,
unsigned int  i
[virtual]
 

Sets the Range of the TupleCut object indexed by i.

Reimplemented from PlotterBase.

Reimplemented in CutPlotter.

Definition at line 953 of file XyPlotter.cxx.

References getCutAt(), getDataRep(), Observable::notifyObservers(), and setRange().

void XyPlotter::setEnableZ bool  yes = true  )  [virtual]
 

Sets the display of the Z axis on.

Reimplemented from PlotterBase.

Definition at line 220 of file XyPlotter.cxx.

References m_axis_rep, and m_plotter.

Referenced by Cut2DPlotter::Cut2DPlotter().

void XyPlotter::setErrorDisplay hippodraw::Axes::Type  axis,
bool 
[virtual]
 

Sets the display of the error bars on or off.

Implements PlotterBase.

Definition at line 552 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::setHighRange hippodraw::Axes::Type  axis,
int  parm,
bool  dragging
[virtual]
 

Sets the high end of the Range of data displayed.

Reimplemented from PlotterBase.

Definition at line 479 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void PlotterBase::setLabel const std::string axis,
const std::string label
[virtual, inherited]
 

Sets the label of specified axis to label.

The default is to take the label from bound NTuple column. Invoking this member function overrides that. To return to taking the label from the NTuple column, label should be set to "%l".

Note:
This method is only used with the SIP based Python extension module.

Definition at line 263 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), Observable::notifyObservers(), and num_util::type().

Referenced by QtDisplay::setLabel().

void XyPlotter::setLabel hippodraw::Axes::Type  ,
const std::string value
[virtual]
 

Sets the label of the specified axis to value.

Reimplemented from PlotterBase.

Definition at line 838 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void XyPlotter::setLabelFont FontBase font,
hippodraw::Axes::Type  axes
 

Set the font to be used to override the default while drawing axis label.

Definition at line 231 of file XyPlotter.cxx.

References m_axis_rep, hippodraw::Axes::X, hippodraw::Axes::Y, and hippodraw::Axes::Z.

void XyPlotter::setLowRange hippodraw::Axes::Type  axis,
int  parm,
bool  dragging
[virtual]
 

Sets the low end of the Range of data displayed.

Reimplemented from PlotterBase.

Definition at line 470 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void PlotterBase::setNumberOfBins const std::string axis,
unsigned int  number
[virtual, inherited]
 

Sets the number of bins.

Sets the number of bins of the plot. Not all plots have a bin attribute. Since histogram-ming plots are commonly used, this method has been declared as a convenience to script writers.

Definition at line 385 of file PlotterBase.cxx.

References hippodraw::Axes::convert().

Referenced by QtDisplay::setNumberOfBins().

void XyPlotter::setNumberOfBins hippodraw::Axes::Type  axis,
unsigned int  number
[virtual]
 

Sets the number of bins.

Sets the number of bins of the contained ProjectorBase objects to number along the axis axis.

Reimplemented from PlotterBase.

Definition at line 917 of file XyPlotter.cxx.

References m_plotter.

void PlotterBase::setOffset const std::string axis,
double  offset
[virtual, inherited]
 

Sets the bin offset.

Sets the bin offset parameter of the plot. Not all plots have a bin parameter. Since histogram-ming plots are commonly used, this method has been declared as a convenience to script writers. The implementation is this base class does nothing.

Definition at line 377 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), and PlotterBase::setOffset().

void XyPlotter::setOffset hippodraw::Axes::Type  axis,
double  offset
[virtual]
 

Sets the offset.

Sets the edges of the bins to be offset from its current value by the amount offset along the axis axis.

Reimplemented from PlotterBase.

Definition at line 924 of file XyPlotter.cxx.

References m_plotter.

void PlotterBase::setOffsets double  xoffset,
double  yoffset
[virtual, inherited]
 

Sets the offsets on the x and y axis.

Definition at line 548 of file PlotterBase.cxx.

References PlotterBase::setOffset(), hippodraw::Axes::X, and hippodraw::Axes::Y.

void PlotterBase::setParentDataRepIndex int  index  )  [virtual, inherited]
 

Sets the index of the parent DataRep.

Definition at line 559 of file PlotterBase.cxx.

References PlotterBase::m_parent_datarep_index.

void PlotterBase::setParentPlotter PlotterBase plotter  )  [virtual, inherited]
 

Sets the parent plotter.

Definition at line 569 of file PlotterBase.cxx.

References PlotterBase::m_parent_plotter.

void PlotterBase::setRange const std::string axis,
double  low,
double  high
[inherited]
 

Sets the range on the specified axis.

Creates a Range object from the low and high arguments. The Range is the scaled range. It calls setRange ( hippodraw::Axes::Type, Range, bool ) with third argument true.

Definition at line 310 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), PlotterBase::setRange(), and num_util::type().

void XyPlotter::setRange hippodraw::Axes::Type  axis,
const Range range,
bool  scaled = false,
bool  adjust_width = true
[virtual]
 

Sets the range on the specified axis.

Sets the Range on the axis axis to range. The TransformBase object contained by this object may adjust the range to fall within its limits. If scaled is true, then the Range object's value is a scaled range, otherwise it is the true range. if adjust_width is true, the bin width, if applicable, is adjusts so one has the same number of bins after the range is set, otherwise, the bin width is not changed.

Reimplemented from PlotterBase.

Definition at line 795 of file XyPlotter.cxx.

References m_plotter.

Referenced by setCutRangeAt().

void XyPlotter::setRepColor const Color  )  [virtual]
 

Sets the representation's color.

Implements PlotterBase.

Definition at line 566 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::setRepresentation RepBase pointrep  )  [virtual]
 

Sets the representation.

The representation of the active plotter is changed.

Implements PlotterBase.

Definition at line 524 of file XyPlotter.cxx.

References m_plotter.

void XyPlotter::setScaling hippodraw::Axes::Type  axis,
bool  on = true
[virtual]
 

Sets the scaling attribute of the AxisModelBase object.

Reimplemented from PlotterBase.

Definition at line 488 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void PlotterBase::setTicks const std::string axis,
const std::vector< double > &  values,
const std::vector< std::string > &  labels
[virtual, inherited]
 

Sets the ticks on specified axis.

Definition at line 627 of file PlotterBase.cxx.

References hippodraw::Axes::convert(), PlotterBase::setTicks(), num_util::size(), and num_util::type().

void XyPlotter::setTicks hippodraw::Axes::Type  axis,
const std::vector< AxisTick > &  ticks
[virtual]
 

Sets the ticks for the specified axis.

Reimplemented from PlotterBase.

Definition at line 910 of file XyPlotter.cxx.

References m_plotter.

void PlotterBase::setTicksOnX const std::vector< double > &  values,
const std::vector< std::string > &  labels
[virtual, inherited]
 

Sets the ticks for the X axis.

Note:
This method is provided to avoid interfacing the other one with the same name to Python.

This method is temporary fix to memory leak problem with SIP.

Definition at line 611 of file PlotterBase.cxx.

References PlotterBase::setTicks(), num_util::size(), and hippodraw::Axes::X.

void PlotterBase::setTitle const std::string title  )  [inherited]
 

Sets the title to be displayed.

The implementation is to pass the title parameter to the axes representation.

Definition at line 234 of file PlotterBase.cxx.

References PlotterBase::activePlotIndex(), PlotterBase::getDataRep(), PlotterBase::m_title, and Observable::notifyObservers().

Referenced by createPickTuple(), QtDisplay::setTitle(), and Inspector::titleText_returnPressed().

void XyPlotter::setTitleFont FontBase font  ) 
 

Set the font to be used to override the default while drawing title.

Definition at line 258 of file XyPlotter.cxx.

References m_axis_rep.

void XyPlotter::setTransform TransformBase  )  [virtual]
 

Sets the transform object and redraws.

Reimplemented from PlotterBase.

Definition at line 381 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void XyPlotter::setValueRep BinToColor rep  )  [virtual]
 

Sets the object that will do the value to color transform, if any.

Sets the object that will be used to do the value to color transform, if any, and redraws.

Reimplemented from PlotterBase.

Definition at line 357 of file XyPlotter.cxx.

References m_plotter, and Observable::notifyObservers().

void PlotterBase::setView int  index  )  [inherited]
 

Set the view by index.

Definition at line 789 of file PlotterBase.cxx.

References PlotterBase::m_currentView, PlotterBase::m_views, and PlotterBase::setRange().

Referenced by PlotterBase::deleteView(), PlotterBase::nextView(), and QtDisplay::setView().

const FontBase * XyPlotter::titleFont  )  const
 

What font is being used to override the default while drawing title of plot.

If return value is null pointer the default is being used.

Definition at line 266 of file XyPlotter.cxx.

References m_axis_rep.

Referenced by PlotterBaseXML::createFontElements().

void PlotterBase::toggleActivePlot  )  [inherited]
 

Toggles the active DataRep, if 2 or more are contained by the plotter.

Toggles the active plot. With each call, the current active plot is deselected and the next one becomes the active plot. When the end of the list of plots is reached, all plots become active. If all plots are active then only the first becomes active.

Definition at line 691 of file PlotterBase.cxx.

References PlotterBase::activePlotIndex(), PlotterBase::checkAxisScaling(), PlotterBase::getNumDataReps(), and PlotterBase::setActivePlot().

void PlotterBase::update const Observable  )  [virtual, inherited]
 

Sends notification to it's Observer ViewBase object that redrawing is needed.

Implements hippodraw::Observer.

Reimplemented in CutPlotter.

Definition at line 88 of file PlotterBase.cxx.

References Observable::notifyObservers().

void XyPlotter::update  )  [virtual]
 

Updates the plotter.

Updates the plotter by informing contained DataRep that an update is needed. Does not notify its Observer objects.

Implements PlotterBase.

Definition at line 517 of file XyPlotter.cxx.

References m_plotter.

Referenced by CutPlotter::setCutColor().

float XyPlotter::userToInvertedMarginY double  y  )  const [virtual]
 

Converts the user Y coordinate into the top-left based margin Y coordinate.

Implements PlotterBase.

Definition at line 403 of file XyPlotter.cxx.

References HippoRectangle::getHeight(), HippoRectangle::getY(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_y_ratio.

float XyPlotter::userToMarginColor double  c  )  const [virtual]
 

Converts the user Z coordinate into the margin color (X) coordinate.

Reimplemented from PlotterBase.

Definition at line 184 of file XyPlotter.cxx.

References HippoRectangle::getX(), HippoRectangle::getZ(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_z_ratio.

float XyPlotter::userToMarginX double  x  )  const [virtual]
 

Converts the user X coordinate into the margin X coordinate.

Implements PlotterBase.

Definition at line 389 of file XyPlotter.cxx.

References HippoRectangle::getX(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_x_ratio.

float XyPlotter::userToMarginY double  y  )  const [virtual]
 

Converts the user Y coordinate into the margin Y coordinate.

Implements PlotterBase.

Definition at line 396 of file XyPlotter.cxx.

References HippoRectangle::getY(), PlotterBase::m_margin_rect, PlotterBase::m_user_rect, and m_y_ratio.

bool XyPlotter::wantsPixmap  )  const [virtual]
 

Returns true.

Since the data area will be filled, an off screen pixmap would be more efficient.

Reimplemented from PlotterBase.

Definition at line 213 of file XyPlotter.cxx.

References hasAxis(), m_plotter, and hippodraw::Axes::Z.

void hippodraw::Observer::willDelete const Observable  )  [virtual, inherited]
 

Notifies this Observer object that one of its Observable objects is about to be deleted.

Since most Observable objects are owned by its Observer, it is the Observer that issued the delete. Thus the default implementation here does nothing. Derived classes that observe objects owned by another should implement this method to remove the Observable from the list they are observing.

Reimplemented in FunctionRep, DataSourceController, CutPlotter, TextPlotter, BinningProjector, DyHist1DProjector, DyHist2DProjector, NTupleProjector, Profile2DProjector, and ProfileProjector.

Definition at line 25 of file Observer.cxx.

Referenced by DataRep::~DataRep(), DataSource::~DataSource(), NTuple::~NTuple(), and RTuple::~RTuple().


Member Data Documentation

bool PlotterBase::current_range_saved [protected, inherited]
 

Returns true if the current range on the axes have been saved.

Definition at line 130 of file PlotterBase.h.

Referenced by PlotterBase::getCurrentRangeSaved(), PlotterBase::PlotterBase(), and PlotterBase::setCurrentRangeSaved().

int XyPlotter::m_active_index [private]
 

Index to the active plotter.

Definition at line 69 of file XyPlotter.h.

Referenced by activePlotIndex(), addDataRep(), addDataRepStacked(), drawIn(), getTarget(), isTargetable(), and setActivePlot().

double PlotterBase::m_aspect_ratio [protected, inherited]
 

The aspect ratio.

The ratio of the width to the height that the should be used when drawing the plotter. A ratio of zero, the default, indicates that any ratio is acceptable.

Definition at line 81 of file PlotterBase.h.

Referenced by getAspectRatio(), and PlotterBase::setAspectRatio().

AxisRepBase* XyPlotter::m_axis_rep [protected]
 

The axes model graphical representation.

If another plotter in a composite is controlling the axis, then the pointer may be null.

Definition at line 90 of file XyPlotter.h.

Referenced by drawCrossHairs(), drawIn(), labelFont(), setEnableZ(), setLabelFont(), setTitleFont(), titleFont(), XyPlotter(), and ~XyPlotter().

double PlotterBase::m_crossX [protected, inherited]
 

The x position of the cross hair.

Definition at line 96 of file PlotterBase.h.

Referenced by drawCrossHairs(), and PlotterBase::setCrossX().

double PlotterBase::m_crossY [protected, inherited]
 

The y position of the cross hair.

Definition at line 99 of file PlotterBase.h.

Referenced by drawCrossHairs(), and PlotterBase::setCrossY().

int PlotterBase::m_currentView [protected, inherited]
 

Index of the current view.

Definition at line 142 of file PlotterBase.h.

Referenced by PlotterBase::currentView(), PlotterBase::nextView(), PlotterBase::saveView(), PlotterBase::saveViewAtIndex(), and PlotterBase::setView().

HippoRectangle PlotterBase::m_margin_rect [protected, inherited]
 

The rectangle area in which the projected points are plotted.

Definition at line 104 of file PlotterBase.h.

Referenced by calcAxisRatios(), PlotterBase::getMarginRect(), marginToInvertedUserY(), marginToUserX(), marginToUserY(), prepareMarginRect(), userToInvertedMarginY(), userToMarginColor(), userToMarginX(), and userToMarginY().

std::string PlotterBase::m_name [protected, inherited]
 

The name of the type of plotter.

Used to lookup the plotter in a factory.

Definition at line 85 of file PlotterBase.h.

Referenced by PlotterBase::name().

int PlotterBase::m_parent_datarep_index [protected, inherited]
 

Parent DataRep index.

Definition at line 114 of file PlotterBase.h.

Referenced by PlotterBase::getParentDataRepIndex(), and PlotterBase::setParentDataRepIndex().

PlotterBase* PlotterBase::m_parent_plotter [protected, inherited]
 

Parent plotter.

Definition at line 111 of file PlotterBase.h.

Referenced by PlotterBase::getParentPlotter(), and PlotterBase::setParentPlotter().

CompositePlotter* XyPlotter::m_plotter [protected]
 

The currently active plotter that draws the data points.

Definition at line 85 of file XyPlotter.h.

Referenced by activeProjector(), addDataRep(), addDataRepStacked(), addValues(), autoScale(), calcAxisRatios(), checkAxisScaling(), createNTuple(), createPickTuple(), drawIn(), errorDisplay(), fillPickedPoint(), getAxisModel(), getBinWidth(), getInternalLabel(), getLabel(), getNumberOfEntries(), getOffset(), getPosRange(), getRange(), getTransform(), getValueRep(), hasAutoScaled(), hasNTupleBindings(), isAutoRanging(), marginToUserXY(), matrixTranspose(), removeDataRep(), repColor(), representation(), reset(), selectedDataRep(), setActivePlot(), setAutoRanging(), setAutoTicks(), setAxisModel(), setBinWidth(), setEnableZ(), setErrorDisplay(), setHighRange(), setLabel(), setLowRange(), setNumberOfBins(), setOffset(), setRange(), setRepColor(), setRepresentation(), setScaling(), setTicks(), setTransform(), setValueRep(), update(), wantsPixmap(), and XyPlotter().

int PlotterBase::m_plotterId [protected, inherited]
 

A unique plotter id.

Definition at line 134 of file PlotterBase.h.

Referenced by PlotterBase::plotterId(), and PlotterBase::setPlotterId().

PlotterList_t XyPlotter::m_plotters [private]
 

The list of CompositePlotter objects contained by this plotter.

Definition at line 55 of file XyPlotter.h.

Referenced by addDataRepStacked(), checkAutoScale(), drawIn(), drawProjValues(), fillCutList(), getAspectRatio(), getDataRep(), getNumDataReps(), getTarget(), hasAxis(), hasZoomY(), indexOf(), isTargetable(), prepareToDraw(), setActivePlot(), XyPlotter(), and ~XyPlotter().

std::string PlotterBase::m_title [protected, inherited]
 

The main label; the title of the plot.

Definition at line 93 of file PlotterBase.h.

Referenced by drawIn(), PlotterBase::getInternalTitle(), PlotterBase::getTitle(), PlotterBase::setTitle(), and TextPlotter::TextPlotter().

HippoRectangle PlotterBase::m_user_rect [protected, inherited]
 

The abstract data space.

In the user space X increases to the right and Y increases upward.

Definition at line 108 of file PlotterBase.h.

Referenced by calcAxisRatios(), drawIn(), PlotterBase::getUserRect(), marginToInvertedUserY(), marginToUserX(), marginToUserY(), userToInvertedMarginY(), userToMarginColor(), userToMarginX(), and userToMarginY().

std::vector< std::vector<double> > PlotterBase::m_views [protected, inherited]
 

A vector of x and y ranges to be used as a circular buffer allowing one to cycle through the saved plot "views".

Definition at line 139 of file PlotterBase.h.

Referenced by PlotterBase::deleteView(), PlotterBase::nextView(), PlotterBase::numViews(), PlotterBase::saveView(), PlotterBase::saveViewAtIndex(), and PlotterBase::setView().

double XyPlotter::m_x_ratio [private]
 

The conversion ratio from the user coordinate system to the view's coordinate system along the X axis.

Definition at line 60 of file XyPlotter.h.

Referenced by calcAxisRatios(), marginToUserX(), and userToMarginX().

double XyPlotter::m_y_ratio [private]
 

The conversion ratio from the user coordinate system to the view's coordinate system along the Y axis.

Definition at line 65 of file XyPlotter.h.

Referenced by calcAxisRatios(), marginToInvertedUserY(), marginToUserY(), userToInvertedMarginY(), and userToMarginY().

double XyPlotter::m_z_ratio [protected]
 

The conversion ratio from the user coordinate system to the view's coordinate system along the color axis.

Definition at line 94 of file XyPlotter.h.

Referenced by calcAxisRatios(), and userToMarginColor().

int PlotterBase::s_plotters [static, protected, inherited]
 

Reference count for creating plotter ids.

Referenced by PlotterBase::setPlotterId().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3