23 _forcedMax(s_forcedMax),
24 _forcedMin(s_forcedMin),
29 _xAxisTitleOffset(1.0),
30 _yAxisTitleOffset(1.0),
31 _xAxisLabelOffset(0.010),
32 _yAxisLabelOffset(0.005),
33 _xAxisTickLength(0.035),
34 _yAxisTickLength(0.015),
35 _xAxisLabelSize(0.06),
36 _yAxisLabelSize(0.06),
37 _xAxisTitleSize(0.06),
38 _yAxisTitleSize(0.06),
39 _histogramOwnership(0),
44 WELCOME_LOG <<
"Hello from the Plotter() constructor!";
45 TString canvasNameUnique = canvasName; canvasNameUnique +=
s_plotterCount;
46 _canvas =
new TCanvas(canvasNameUnique, canvasName, width, height);
62 _canvas( new TCanvas( other._canvas )),
63 _legend(other._legend),
64 _forcedMax(other._forcedMax),
65 _forcedMin(other._forcedMin),
66 _objToPlot(other._objToPlot),
67 _histograms(other._histograms),
68 _colours(other._colours),
69 _lMargin(other._lMargin),
70 _rMargin(other._rMargin),
71 _tMargin(other._tMargin),
72 _bMargin(other._bMargin),
73 _xAxisLabelOffset(other._xAxisLabelOffset),
74 _yAxisLabelOffset(other._yAxisLabelOffset),
75 _histogramOwnership(0),
134 void Plotter::addDot(
double xpos,
double ypos,
double size,
int colour, TString shape,
double sizeY){
136 if (sizeY == 0.0) sizeY = size;
138 if (shape ==
"square") {
139 TBox* box =
new TBox(xpos-size*0.5,ypos-sizeY*0.5,xpos+size*0.5,ypos+sizeY*0.5);
140 box->SetFillColor(colour);
143 if (shape ==
"circle") {
144 TEllipse* box =
new TEllipse(xpos,ypos,size*0.5,sizeY*0.5);
145 box->SetFillColor(colour);
static TString s_imageformat
static int s_plotterCount
void addObject(TObject *obj)
virtual void setCanvasDefaults(TPad *pad)
static double s_forcedMin
std::vector< TObject * > _histograms
std::vector< TObject * > _objToPlot
void setPropertiesFromTH1(TH1 *hist)
static TString s_imageformat2
std::vector< int > _colours
void addDot(double xpos, double ypos, double size, int colour=1, TString shape="circle", double sizeY=0.0)
void setColor(int i, int color)
void add(TObject *histogram)
static double s_forcedMax
Plotter(TString canvasName, double width, double height)
void setImageFormat(TString format)
static TString s_legend_position