DyHistogram.cxx
Go to the documentation of this file.
1 
12 // for truncation warning in debug mode
13 #ifdef _MSC_VER
14 #include "msdevstudio/MSconfig.h"
15 #endif
16 
17 #include "DyHistogram.h"
18 
20 #include "reps/ColumnPointRep.h"
21 
22 // using namespace hippodraw;
23 namespace hippodraw {
24 
26  : DataRep ()
27 {
28  m_name = "Histogram";
29 
31  m_rep = new ColumnPointRep();
32 }
33 
35 {
36  return new DyHistogram ( *this );
37 }
38 
40 {
41  return num == 1;
42 }
43 
44 bool
47 {
48  return true;
49 }
50 
51 void
54 {
55  DataRep::setPointRep ( rep );
56  if ( rep -> name () == "Symbol" ) {
57  rep -> setSize ( 4. );
58  setErrorDisplay ( Axes::Y, true );
59  notifyObservers ();
60  }
61 }
62 
63 bool
66 {
67  return axis == Axes::X || axis == Axes::Y;
68 }
69 
70 } // namespace hippodraw
std::string m_name
The name of the display as it might be displayed in a GUI.
Definition: DataRep.h:76
virtual void notifyObservers() const
Notifies Observer objects of a change.
Definition: Observable.cxx:93
DyHist1Projector class interface.
const std::string & name() const
Returns the name of the display.
Definition: DataRep.cxx:72
virtual void setPointRep(RepBase *pointrep)
Sets the representation of the data points.
Definition: DataRep.cxx:217
void setErrorDisplay(Axes::Type axis, bool)
Sets the display of error bar, if applicable, on the specified axis.
Definition: DataRep.cxx:186
virtual bool acceptFunction(int num)
Returns true if the DataRep accepts functions on number variables.
Definition: DyHistogram.cxx:39
A derived class of BinningProjector that projects a column of data into a one dimensional histogram...
return rep
Definition: Inspector.cxx:3843
RepBase * m_rep
The representation used for drawing each data point in the view.
Definition: DataRep.h:94
The base class for data representations.
Definition: DataRep.h:68
DyHistogram()
The default constructor.
Definition: DyHistogram.cxx:25
hippodraw::DyHistogram class interface.
virtual void setPointRep(RepBase *rep)
Sets the representation of the data points.
Definition: DyHistogram.cxx:53
virtual bool hasAxis(hippodraw::Axes::Type) const
Returns true if the data representation has specified axis type axis.
Definition: DyHistogram.cxx:65
ProjectorBase * m_projector
A projector used to transform data to projected values that will be plotted.
Definition: DataRep.h:90
hippodraw::ColumnPointRep class interface
virtual DataRep * clone()
The clone function returns an object of its own kind which is a copy of this object at this moment...
Definition: DyHistogram.cxx:34
virtual bool hasErrorDisplay() const
Returns true.
Definition: DyHistogram.cxx:46
A PointRep class that draws a column to represent the value.
Type
Axes constants.
Definition: AxesType.h:31
The base class for the point representation hierarchy.
Definition: RepBase.h:45

Generated for HippoDraw Class Library by doxygen