14 #ifndef _PlotterBase_H_
15 #define _PlotterBase_H_
64 virtual void setScaling (
Axes::Type axis,
bool on =
true );
120 bool hasAutoScaled ()
const;
152 const std::string & name ()
const;
157 virtual void setScaleFactor (
Axes::Type axis,
double factor );
161 virtual bool isAxisScaled (
Axes::Type axis )
const;
172 virtual void update () = 0;
177 virtual bool hasNTupleBindings ()
const = 0;
183 virtual bool hasZoomY ()
const ;
190 virtual void setBinWidth (
Axes::Type axis,
double width );
198 virtual void setBinWidth (
const std::string & axis,
double width );
204 int parameter,
bool dragging );
210 virtual void setOffset (
Axes::Type axis,
double offset );
218 virtual void setOffset (
const std::string & axis,
double offset );
225 virtual void setNumberOfBins (
const std::string & axis,
226 unsigned int number );
233 virtual void setNumberOfBins (
Axes::Type axis,
234 unsigned int number );
245 virtual void addDataRep (
DataRep * rep );
248 virtual void setActivePlot (
int index,
bool redraw );
252 virtual int activePlotIndex ( )
const;
256 virtual int getParentDataRepIndex ( )
const;
259 virtual void setParentDataRepIndex (
int index );
265 virtual void setParentPlotter(
PlotterBase* plotter );
268 virtual void reset ( );
277 virtual DataRep * selectedDataRep ()
const;
287 virtual int getNumDataReps()
const;
290 virtual DataRep * getDataRep (
int index )
const;
297 virtual void removeDataRep (
DataRep * );
304 virtual void prepareToDraw ();
308 virtual void drawIn (
ViewBase * view ) = 0;
314 virtual void drawCrossHairs (
ViewBase * view );
324 virtual void setRepresentation (
RepBase * pointrep ) = 0;
327 virtual RepBase * representation ( )
const = 0;
334 virtual const BinToColor * getValueRep ()
const;
339 virtual void setValueRep (
BinToColor * rep );
355 virtual void setFitsTransform (
const std::string & );
372 virtual void setAutoRanging (
const std::string & axis,
bool flag );
378 virtual void setAutoRanging (
Axes::Type axis,
bool flag );
382 virtual void setAutoRanging (
bool flag );
386 virtual void setReverse (
bool flag );
390 virtual void setShowGrid (
bool flag );
394 virtual void setBoxEdge (
bool flag );
398 virtual bool getBoxEdge ();
402 virtual bool getShowGrid ();
408 virtual bool isAutoRanging (
Axes::Type axis )
const;
412 virtual bool isReverse ()
const;
419 virtual void autoScale();
423 void setTitle(
const std::string & title );
426 const std::string & getTitle()
const;
436 virtual void setLabel (
const std::string & axis,
437 const std::string & label );
442 virtual void setLabel (
Axes::Type,
const std::string & value );
447 virtual const std::string & getLabel (
Axes::Type )
const;
455 virtual const std::string &
456 getInternalTitle ( )
const;
464 virtual const std::string &
469 virtual void checkAxisScaling ();
474 virtual double getBinWidth (
Axes::Type axis)
const;
481 double getBinWidth (
const std::string & axis )
const;
485 virtual double getOffset (
Axes::Type axis)
const;
489 double getOffset (
const std::string & axis )
const;
493 virtual int getNumberOfEntries ()
const;
500 int getNumOfEntries ()
const;
505 virtual void setErrorDisplay (
Axes::Type axis,
bool ) = 0;
508 virtual bool errorDisplay (
Axes::Type axis )
const = 0;
523 bool scaled =
false,
bool adjust_width =
true );
529 void setRange (
const std::string & axis,
double low,
double high );
543 virtual double getPosRange (
Axes::Type axis )
const;
548 virtual void setLowRange (
Axes::Type axis,
int parm,
554 virtual void setHighRange (
Axes::Type axis,
int parm,
558 virtual void setRepColor (
const Color & ) = 0;
561 virtual const Color & repColor ()
const = 0;
564 const Rect & getUserRect ()
const;
567 const Rect & getRawRect ()
const;
574 virtual NTuple * createPickTuple ();
581 virtual void fillPickedPointFrom (
double mx,
double my,
582 std::vector < double > & picked )
const;
590 virtual double getZValue (
double x,
double y,
bool scaled =
true )
const;
595 virtual bool hasAxis (
Axes::Type axis )
const;
598 void setCrossX (
double val );
601 void setCrossY (
double val );
609 virtual void addValues (
const std::vector < double > & v );
618 virtual double getAspectRatio ()
const;
624 void setAspectRatio (
double ratio );
632 virtual NTuple * createNTuple ()
const = 0;
642 virtual bool wantsPixmap ( )
const;
645 virtual void setOffsets(
double xoffset,
double yoffset );
650 virtual void setEnableZ (
bool yes =
true );
655 virtual void setAutoTicks (
Axes::Type axis,
bool yes );
660 const std::vector < AxisTick > & ticks );
664 virtual void setAutoTicks (
const std::string &,
bool on );
673 virtual void setAutoTicksOnX (
bool yes );
682 virtual void setTicksOnX (
const std::vector < double > & values,
683 const std::vector < std::string > & labels );
687 virtual void setTicks (
const std::string & axis,
688 const std::vector < double > & values,
689 const std::vector < std::string > & labels );
694 virtual double getLowRangeOnX ( )
const;
700 virtual double getHighRangeOnX ()
const;
707 virtual void matrixTranspose (
bool yes );
716 virtual bool isTargetable ()
const;
722 virtual DataRep * getTarget ()
const;
729 virtual int indexOf (
const DataRep * rep )
const;
738 void toggleActivePlot ();
741 virtual int plotterId ()
const;
749 int saveView (
const std::vector<double> & range_values );
760 int saveViewAtIndex(
const std::vector<double>& range_values,
unsigned int i );
763 void setView (
int index );
770 int nextView (
bool stepForward=
true);
774 int numViews ()
const;
777 void deleteView (
int index );
780 int currentView ()
const;
786 virtual void fillCutList ( std::vector < const TupleCut * > & cuts )
const;
792 virtual void setCutRangeAt (
const Range & range,
unsigned int i );
796 virtual void setCurrentRangeSaved(
bool flag );
800 virtual bool getCurrentRangeSaved( );
804 virtual const std::vector <double> & getZValues();
805 virtual const std::vector <unsigned int> & getShape();
809 virtual void setMinEntries(
int entries );
814 virtual int getMinEntries ();
826 virtual const FontBase * titleFont ( )
const;
834 virtual bool isImageConvertable ()
const;
837 virtual bool isTextPlotter()
const;
841 virtual void setTopMargin(
double top );
842 virtual void setBottomMargin(
double bottom );
843 virtual void setLeftMargin(
double left );
844 virtual void setZMargin(
double z );
845 virtual double getTopMargin();
846 virtual double getBottomMargin();
847 virtual double getLeftMargin();
848 virtual double getZMargin();
852 virtual void setNeedUpdate(
bool isChanged);
856 virtual double getScaleFactor (
Axes::Type axis )
const;
862 #endif // _PlotterBase_H_