XyPlotter.h
Go to the documentation of this file.
1 /* -*- mode: c++; -*- */
2 
14 #ifndef _XyPlotter_H_
15 #define _XyPlotter_H_
16 
17 #include "PlotterBase.h"
18 
19 namespace hippodraw {
20 
21 class AxisRepBase;
22 class CompositePlotter;
23 
45 {
46 private:
47 
49  double m_margin_top;
51  double m_margin_left;
52  double m_margin_z;
53 
54 
58  typedef std::vector < CompositePlotter * > PlotterList_t;
59 
64 
68 
72 
76  std::vector < unsigned int > m_hammer_shape;
77  std::vector < unsigned int > m_lambert_shape;
78 
82  void checkAutoScale ();
83 
87  void prepareToDraw ();
88 
93 
94 
95 protected:
96 
100 
105 
108  double m_z_ratio;
109 
112  TupleCut * getCutAt ( unsigned int i );
113 
114 public:
115 
117  XyPlotter ( const std::string & name = "XyPlotter" );
118 
120  XyPlotter ( const XyPlotter & plotter );
121 
123  virtual ~XyPlotter ();
124 
127  PlotterBase * clone();
128 
129 
132  virtual void setEnableZ ( bool yes = true );
133 
134  virtual void drawIn ( ViewBase * view );
135 
140  virtual void drawCrossHairs ( ViewBase * view );
141 
142  virtual NTuple * createNTuple () const;
143 
146  virtual bool wantsPixmap ( ) const;
147 
151  void setLabelFont( FontBase* font, Axes::Type axes );
152 
157  virtual FontBase* labelFont ( Axes::Type axes ) const;
158 
160  void setTitleFont( FontBase* font );
161 
165  virtual const FontBase * titleFont ( ) const;
166 
173  virtual void setActivePlot ( int index, bool redraw );
174 
177  virtual int activePlotIndex () const;
178 
182  virtual void addDataRep ( DataRep * rep );
183 
188  virtual void addDataRepStacked ( DataRep * rep );
189 
192  virtual void removeDataRep ( DataRep * rep );
193 
199  virtual void autoScale ( );
200 
205  virtual void setValueRep ( BinToColor * rep );
206 
210  virtual void setAutoRanging ( bool flag );
211 
216  virtual void setAutoRanging ( Axes::Type axis, bool flag );
217 
220  virtual void setReverse ( bool flag );
221 
224  virtual void setShowGrid ( bool flag );
225 
228  virtual bool getShowGrid ();
229 
232  virtual void setBoxEdge(bool flag);
233 
236  virtual bool getBoxEdge();
237 
240  virtual void setTransform ( TransformBase * );
241 
244  virtual void setFitsTransform ( const std::string & );
245 
258  virtual NTuple * createPickTuple ();
259 
274  virtual void fillPickedPointFrom ( double mx, double my,
275  std::vector < double > & picked ) const;
276 
279  virtual void setLowRange ( Axes::Type axis, int parm,
280  bool dragging );
281 
284  virtual void setHighRange ( Axes::Type axis, int parm,
285  bool dragging );
286 
289  virtual void setScaling ( Axes::Type axis, bool on = true );
290 
297  virtual double getAspectRatio () const;
298 
299  virtual void update ();
300 
304  virtual void setRepresentation ( RepBase * pointrep );
305 
308  virtual RepBase * representation ( ) const;
309 
313  virtual AxisModelBase * getAxisModel ( Axes::Type axis ) const;
314 
318  virtual void setAxisModel ( AxisModelBase * , Axes::Type );
319 
322  virtual void setErrorDisplay ( Axes::Type axis, bool );
323 
326  virtual bool errorDisplay ( Axes::Type axis ) const;
327 
330  virtual void setRepColor ( const Color & );
331 
334  virtual const Color & repColor () const;
335 
341  virtual void drawProjValues ( ViewBase * view );
342 
345  bool hasAutoScaled () const;
346 
350  virtual bool hasNTupleBindings () const;
351 
355  virtual bool hasZoomY () const;
356 
359  virtual void checkAxisScaling ();
360 
363  virtual ProjectorBase * getProjector ( int i ) const;
364 
367  virtual ProjectorBase * activeProjector () const;
368 
371  virtual DataRep * getDataRep ( int index ) const;
372 
375  virtual DataRep * getTarget ( ) const;
376 
379  bool isTargetable () const;
380 
384  virtual int getNumDataReps () const;
385 
388  virtual int indexOf ( const DataRep * ) const;
389 
392  virtual double getBinWidth ( Axes::Type ) const;
393 
398  virtual void setBinWidth ( Axes::Type axis, double width );
399 
401  virtual void reset ( );
402 
407  virtual const Range & getRange ( Axes::Type axis,
408  bool scaled ) const;
409 
412  virtual double getPosRange ( Axes::Type axis ) const;
413 
417  virtual double getOffset (Axes::Type axis) const;
418 
421  virtual TransformBase * getTransform () const;
422 
425  virtual TransformBase * getFitsTransform () const;
426 
432  virtual void addValues ( const std::vector < double > & v );
433 
434  virtual const std::string &
435  getInternalLabel ( Axes::Type axis ) const;
436 
439  virtual const std::string & getLabel ( Axes::Type ) const;
440 
443  virtual void setLabel ( Axes::Type, const std::string & value );
444 
447  virtual int getNumberOfEntries () const;
448 
451  virtual bool hasAxis ( Axes::Type axis ) const;
452 
457  virtual const BinToColor * getValueRep () const;
458 
462  virtual bool isAutoRanging ( Axes::Type axis ) const;
463 
466  virtual bool isReverse ( ) const;
467 
472  virtual void matrixTranspose ( bool yes );
473 
477  virtual DataRep * selectedDataRep () const;
478 
481  virtual void setAutoTicks ( Axes::Type axis, bool yes );
482 
485  virtual void setTicks ( Axes::Type axis,
486  const std::vector < AxisTick > & ticks );
487 
492  virtual void setNumberOfBins ( Axes::Type axis,
493  unsigned int number );
494 
499  virtual void setOffset ( Axes::Type axis, double offset );
500 
511  virtual void setRange ( Axes::Type axis, const Range & range,
512  bool scaled = false, bool adjust_width = true );
513 
517  void fillCutList ( std::vector < const TupleCut * > & cuts ) const;
518 
521  virtual void setCutRangeAt ( const Range & range, unsigned int i );
522 
526  virtual Range getCutRange ();
527 
530  virtual void setCutInverted ( unsigned int i, bool yes = true );
531 
534  virtual void setCutEnabled ( unsigned int i, bool yes = true );
535 
536 
537  const std::vector <double> & getZValues();
538  const std::vector <unsigned int> & getShape();
539 
541  virtual bool getCutInversion ();
542 
545  virtual void setMinEntries( int entries );
546 
549  virtual int getMinEntries ();
550 
553  virtual void setNeedUpdate(bool isChanged);
554 
559  virtual bool isImageConvertable () const;
560 
562  virtual void setTopMargin( double top );
563  virtual void setBottomMargin( double bottom );
564  virtual void setLeftMargin( double left );
565  virtual void setZMargin( double z );
566 
567  virtual double getTopMargin();
568  virtual double getBottomMargin();
569  virtual double getLeftMargin();
570  virtual double getZMargin();
571 
574  virtual void setScaleFactor ( Axes::Type axis, double factor );
575 
578  virtual double getScaleFactor ( Axes::Type axis ) const;
579 
582  virtual bool isAxisScaled ( Axes::Type axis ) const;
583 
584 };
585 
586 } // namespace hippodraw
587 
588 #endif // _XyPlotter_H_

Generated for HippoDraw Class Library by doxygen