14 #include "msdevstudio/MSconfig.h"
38 m_parent_datarep ( 0 ),
46 m_name ( rep.m_name ),
47 m_title ( rep.m_title ),
103 const std::string & label )
190 m_rep -> setErrorOn ( axis, flag );
221 bool yes_x =
m_rep -> xError ();
222 bool yes_y =
m_rep -> yError ();
223 color =
m_rep -> getColor ();
226 rep -> setErrorOn (
Axes::X, yes_x );
227 rep -> setErrorOn (
Axes::Y, yes_y );
230 m_rep -> setColor ( color );
243 const Color color ( value );
244 m_rep -> setColor ( color );
338 std::vector<double> & columnData)
const {
348 return m_projector -> createNTupleWith ( cut_list );
491 const string & label = projector -> getXLabel ();
494 int index = projector -> indexOf ( label );
497 const Range & range = projector -> getRange (
Axes::X );
503 const vector < TupleCut > &
523 string what (
"DataRep::setCutRange: index out of range." );
524 throw std::out_of_range ( what );
virtual double getMean(const std::string &axis)
Returns the mean.
ProjectorBase * m_projector
A projector used to transform data to projected values that will be plotted.
Value
A few common colors.
column
The column indices for 2 dimension data point tuple.
virtual DataRep * clone()=0
The clone function returns an object of its own kind which is a copy of this object.
DataRep()
The default constructor.
virtual NTuple * getNTupleAfterCuts() const
Template for projectors that can return subsets of the NTuple used by the DataRep.
void setErrorDisplay(Axes::Type axis, bool)
Sets the display of error bar, if applicable, on the specified axis.
void setColumn(unsigned int col)
Sets the column in the DataSource to be used.
virtual double getRMS(const std::string &axis)
Returns the RMS.
void setRepStyle(int style)
Sets the style type of the point representation.
The base class for the point representation hierarchy.
virtual void setRange(Axes::Type axis, bool const_width=true)
Sets the range of the selected axis.
const std::vector< TupleCut > & getCuts() const
Returns a reference to the cut list.
virtual ~DataRep()
The destructor.
double getPosRange(Axes::Type axis)
Returns the smallest positive number from in the range of the data.
CutRangeRep * m_cut_rep
The representation of the cut or highlighted range.
int getNumberOfEntries() const
Returns the number of entries used for the DataRep object.
void setRange(const Range &range)
Sets the range of the cut.
NTuple * createNTuple() const
Returns a new NTuple representation of the receiving object.
virtual bool isSelected() const
Returns true if representation is in selected state, otherwise returns false.
virtual bool isSelected() const
Returns true if data representation is in selected state.
virtual bool acceptFunction(int number)
Returns true if the DataRep accepts functions on number variables.
virtual void setAxisBindings(const std::vector< std::string > &bindings)
Sets the axis bindings.
std::string m_name
The name of the display as it might be displayed in a GUI.
const std::string & getTitle() const
Returns the the current title of the object.
virtual void setSize(float value)
Sets the size of the representation.
void drawCuts(TransformBase *transform, ViewBase *view)
Draws the cuts.
virtual ProjectorBase * clone()=0
The clone function returns an object of its own kind which is a copy of this object at this moment...
virtual void fillColumnAfterCuts(const std::string &column, std::vector< double > &columnData) const
Fill the vector with values from named column with the present set of cuts applied.
bool isErrorDisplayed(Axes::Type) const
Returns true if the error bars are being displayed.
Part of an implementation of the Observable Observer pattern based on the example implementation in t...
virtual void setColor(const Color &)
Sets the color of the representation.
void addCut()
Adds a cut to the data representation.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
RepBase * getCutRep()
Returns the point representation that draws the cuts.
virtual DataRep * getParentDataRep() const
Gets the parent DataRep.
virtual void drawProjectedValues(TransformBase *transform, ViewBase *view)
Draws the projected values.
std::string m_title
The title of the object.
const std::string & name() const
Returns the name of the display.
A transform that transforms coordinates from one coordinate system to another.
virtual void setAxisBinding(const std::string &axis, const std::string &label)
Sets the axis binding.
virtual void notifyObservers() const
Notifies Observer objects of a change.
void setRange(Axes::Type axis, bool const_width=true)
Sets the range of the axis.
virtual bool hasZeroRows()
Returns true if this DataRep has zero rows in its DataSource.
virtual bool hasNTupleBindings() const
Returns true if the DataRep's projector can bind to DataSource.
const Color & getRepColor() const
Returns the color used for the representation.
virtual void setDirty(bool value=true)
Sets the dirty flag to value.
RepBase * getRepresentation() const
Returns the representation used to draw the data points.
A DataSource class implemented with std::vector to store the column data. ...
virtual double getPosOn(Axes::Type) const =0
Returns the minimum positive value.
A derived class of PointRepBase class that draws a representation of a cut range. ...
intp size(numeric::array arr)
virtual bool hasZoomY() const
Returns true if this DataRep has zoom feature on the Y axis.
const Range & setBinWidth(Axes::Type axis, double width)
Sets the bin width, if binned, on specified axis to width.
virtual void update()
Updates the data representation.
virtual bool xError() const
Returns true if the point representation displays error on the X axis.
void removeCut()
Remove a region cut on the data representation.
virtual void setParentDataRep(DataRep *parent_datarep)
Sets the parent DataRep.
hippodraw::NTuple class interface.
void toggleInverted(unsigned int i)
Changes state of inversion flag to be the opposite of its current state.
virtual void setAxisModel(Axes::Type axis, AxisModelBase *)
Sets the AxisModel for axis axis.
PyArray_TYPES type(numeric::array arr)
virtual bool hasAxis(Axes::Type axis) const
Returns true if the data representation has specified axis type axis.
void setLabel(const std::string &label)
Sets the label for the cut.
void setRepSize(double size)
Sets the size of the representation.
A Color class for creating the color object following the standard RGB color space.
Range preferredRange(Axes::Type axis) const
Returns the preferred range to display the data.
Base class for DataSource.
virtual void setSelected(bool yes=true)
Sets the data representation as selected.
DataRep * m_parent_datarep
There are times when a given DataRep results from some operations performed on some other DataRep...
Part of an implementation of the Observable-Observer pattern based on the example in the GOF Patterns...
virtual void prepareValues()
Informs the projector to prepare its projected values for plotting.
virtual void fillColumnAfterCuts(const std::string &column, std::vector< double > &columnData) const
Fills a vector with named column data with the current set of cuts applied.
virtual bool isImageConvertable() const
Returns true if the receiving object can be converted to an image.
CutRangeRep class interface.
void setEnabled(unsigned int i, bool yes=true)
Sets the TupleCut indexed by i to be enabled or not.
virtual void addValues(const std::vector< double > &v)
Add the data values to the DataRep.
virtual bool needsMatrixSet() const
Returns true if this data representation needs an XY matrix parameters to be set in order to display ...
virtual void normalizeTo(const DataRep *target)
Normalizes the receiving object to the target one.
virtual Range preferredRange(Axes::Type) const
Returns the preferred Range.
void setCutRangeAt(const Range &range, unsigned int i)
Sets the Range of the TupleCut index by i.
void setAxisModel(Axes::Type axis, AxisModelBase *)
Sets the AxisModel for axis axis.
The base class for data representations.
hippodraw::DataRep class interface.
virtual bool yError() const
Returns true if the point representation displays error on the Y axis.
virtual RepBase * clone()=0
Returns a copy of the object.
hippodraw::TupleCut class interface
virtual void setStyle(unsigned int style)
Sets the symbol of the representation.
virtual const DataSource * getProjectedValues() const
Returns an DataSource representation of the projected data.
virtual void matrixTranspose(bool yes)
Transposes the X and Y axis.
virtual void setDirty(bool yes=true)
Sets the dirty flag.
NTuple * createNTupleUnderRegion() const
Returns a NTuple that is a copy of the projector's DataSource with rows not passing region cuts remov...
virtual bool hasErrorDisplay() const
Returns true if the data representation is capable of error display on the data values.
bool isAxisBinned(Axes::Type axis) const
Returns true if the specified axis is binned, otherwise returns false.
virtual bool isTargetable() const
Returns true if the receiving object is target-able.
virtual NTuple * getNTupleAfterCuts() const
Returns the full NTuple but with the current set of cuts applied.
RepBase * m_rep
The representation used for drawing each data point in the view.
The AxisModelBase class maintains the Range and scaling of an axis.
virtual ProjectorBase * getProjector() const
Returns the Projector object controlling the data.
virtual bool isEmpty() const =0
Returns true if the data source used by this projector is empty.
bool isDirty() const
Return true if the data representation has changed is some way and it needs to be re-drawn...
virtual void setSelected(bool yes=true)
Sets the representation to be selected if yes is true, otherwise set it to be deselected.
The class expresses a cut on a DataSource, i.e.
void set(Color::Value value)
Sets the Color of the PointRepBase object.
virtual void willDelete(const Observable *)
Notifies this Observer object that one of its Observable objects is about to be deleted.
virtual const Color & color() const
Returns the representation's color.
virtual void setPointRep(RepBase *pointrep)
Sets the representation of the data points.
bool isDirty() const
Returns true if the projector has been marked dirty.
Expresses a range of values.
void throwRangeException()
Throws exception with message saying argument is out of range.
virtual bool needColorRep() const
Determines if extra space is needed for a color rep.
void setRepColor(const Color &)
Sets the color of the data representation.
bool hasCut() const
Returns true if the receiving object has one or more regional cuts.
void setTitle(const std::string &title)
Sets the title.
The base class for the Projector hierarchy.
hippodraw::ProjectorBase class interface.
The abstract base class for views.