HyperPlot
v1
Bin and visualise multidimensional datasets
|
HyperPlot, Author: Sam Harnew, sam.h , Date: Dec 2015 arne w@gma il.c om
Class to make plotting 1D root histograms a little easier.
Definition at line 20 of file RootPlotter1D.h.
#include <RootPlotter1D.h>
Public Member Functions | |
virtual double | getGlobalMin () |
virtual double | getGlobalMax () |
RootPlotter1D (TH1 *histogram, double width=400, double height=300) | |
void | addVerticalLine (double xpos, int style=1, int colour=1) |
void | addHorizontalLine (double ypos, int style=1, int colour=1) |
void | addHorizontalBox (double ypos, double width, int fillColour) |
void | addVerticalBox (double xmin, double xmax, int fillColour, int fillstyle) |
void | setRatioMax (double val) |
void | setRatioMin (double val) |
void | plotRatio (TString plotDirectory, TString plotOptions="", TPad *pad=0, double scaleFactor=1.0, double *returnMin=0, double *returnMax=0) |
void | plotPulls (TString plotDirectory, TString plotOptions="", TPad *pad=0, double scaleFactor=1.0) |
void | plotWithRatio (TString plotDirectory, TString plotOptions="", TPad *pad=0) |
void | plotWithPulls (TString plotDirectory, TString plotOptions="", TPad *pad=0) |
Public Member Functions inherited from RootPlotter | |
void | setXaxisName (TString name) |
void | setYaxisName (TString name) |
RootPlotter (TH1 *histogram, double width=300, double height=200) | |
TString & | drawOptions (int i) |
TString & | objDrawOptions (int i) |
void | plotStacked (TPad *pad, double scaleFactor) |
void | plotSame (TPad *pad, TString plotOptions, double scaleFactor=1.0) |
virtual void | plot (TString plotDirectory, TString plotOptions="", TPad *pad=0, double scaleFactor=1.0) |
void | addText (TString text, double x, double y, int alignh=1, int alignv=2, double size=0.06, int ndc=true) |
void | drawLegend () |
virtual | ~RootPlotter () |
Public Member Functions inherited from Plotter | |
int | getColor (int i) |
void | setColor (int i, int color) |
void | usePresetColours (bool val=true) |
void | allImageFormats (bool val=true) |
void | setHistogramOwnership (bool i=1) |
void | setObjectOwnership (bool i=1) |
Plotter (TString canvasName, double width, double height) | |
Plotter (const Plotter &other) | |
void | add (TObject *histogram) |
void | addDot (double xpos, double ypos, double size, int colour=1, TString shape="circle", double sizeY=0.0) |
void | logX (bool log=1) |
void | logY (bool log=1) |
void | logZ (bool log=1) |
void | addObject (TObject *obj) |
int | getNumObjects () |
void | setImageFormat (TString format) |
TPad * | getCanvas () |
void | scaleTextSize (double scale) |
void | scaleAxisTitleSize (double scale) |
void | scaleAxisTitleOffset (double scale) |
void | setXAxisLabelSize (double val) |
void | setYAxisLabelSize (double val) |
void | setXAxisTitleSize (double val) |
void | setYAxisTitleSize (double val) |
void | setXAxisLabelOffset (double val) |
void | setYAxisLabelOffset (double val) |
void | setXAxisTitleOffset (double val) |
void | setYAxisTitleOffset (double val) |
void | setXAxisTickLength (double val) |
void | setYAxisTickLength (double val) |
void | setPropertiesFromTH1 (TH1 *hist) |
void | setMin (double min) |
void | setMax (double max) |
void | setBMargin (double val) |
void | setLMargin (double val) |
void | setRMargin (double val) |
void | setTMargin (double val) |
Static Public Attributes | |
static double | s_ratioMax = -999.999 |
static double | s_ratioMin = -999.999 |
Static Public Attributes inherited from Plotter | |
static TString | s_imageformat = ".pdf" |
static TString | s_imageformat2 = "" |
static TString | s_legend_position = "RightTop" |
static int | s_plotterCount = 0 |
static double | s_forcedMax = -999.999 |
static double | s_forcedMin = -999.999 |
Protected Member Functions | |
double | getRatioMin (RootPlotter1D *ratioPlotter) |
double | getRatioMax (RootPlotter1D *ratioPlotter) |
virtual void | setHistogramStyle (TH1 *histogram, bool setMinMax=1) |
Protected Member Functions inherited from RootPlotter | |
TH1 * | getHistogram (int i) |
Protected Member Functions inherited from Plotter | |
virtual void | setCanvasDefaults (TPad *pad) |
Protected Attributes | |
double | _ratioMax |
double | _ratioMin |
Protected Attributes inherited from RootPlotter | |
TString | _xAxisName |
TString | _yAxisName |
std::vector< TString > | _drawOptions |
std::vector< TString > | _objDrawOptions |
Protected Attributes inherited from Plotter | |
TPad * | _canvas |
TLegend * | _legend |
double | _forcedMax |
double | _forcedMin |
std::vector< TObject * > | _objToPlot |
std::vector< TObject * > | _histograms |
std::vector< int > | _colours |
double | _lMargin |
double | _rMargin |
double | _tMargin |
double | _bMargin |
double | _xAxisTitleOffset |
double | _yAxisTitleOffset |
double | _xAxisLabelOffset |
double | _yAxisLabelOffset |
double | _xAxisTickLength |
double | _yAxisTickLength |
double | _xAxisLabelSize |
double | _yAxisLabelSize |
double | _xAxisTitleSize |
double | _yAxisTitleSize |
bool | _histogramOwnership |
bool | _objectOwnership |
bool | _usePresetColours |
bool | _allImageFormats |
RootPlotter1D::RootPlotter1D | ( | TH1 * | histogram, |
double | width = 400 , |
||
double | height = 300 |
||
) |
Construct a RootPlotter with one histogram on a canvas with specified width and height
Definition at line 8 of file RootPlotter1D.cpp.
void RootPlotter1D::addHorizontalBox | ( | double | ypos, |
double | width, | ||
int | fillColour | ||
) |
Add a box that spans the canvas in the horizontal direction, and goes from xmin to xmax in the vertical direction
Definition at line 94 of file RootPlotter1D.cpp.
void RootPlotter1D::addHorizontalLine | ( | double | ypos, |
int | style = 1 , |
||
int | colour = 1 |
||
) |
Add a line that spans the canvas in the horizontal direction, and is at xmin in the vertical direction
Definition at line 83 of file RootPlotter1D.cpp.
void RootPlotter1D::addVerticalBox | ( | double | xmin, |
double | xmax, | ||
int | fillColour, | ||
int | fillstyle | ||
) |
Add a box that spans the canvas in the vertical direction, and goes from xmin to xmax in the horizontal direction
Definition at line 106 of file RootPlotter1D.cpp.
void RootPlotter1D::addVerticalLine | ( | double | xpos, |
int | style = 1 , |
||
int | colour = 1 |
||
) |
Add a line that spans the canvas in the vertical direction, and is at xmin in the horizontal direction
Definition at line 71 of file RootPlotter1D.cpp.
|
virtual |
find the maximum value accross all histogrmas
Reimplemented from RootPlotter.
Definition at line 137 of file RootPlotter1D.cpp.
|
virtual |
find the minimum value accross all histogrmas
Reimplemented from RootPlotter.
Definition at line 118 of file RootPlotter1D.cpp.
|
protected |
Definition at line 336 of file RootPlotter1D.cpp.
|
protected |
Definition at line 316 of file RootPlotter1D.cpp.
void RootPlotter1D::plotPulls | ( | TString | plotDirectory, |
TString | plotOptions = "" , |
||
TPad * | pad = 0 , |
||
double | scaleFactor = 1.0 |
||
) |
Definition at line 247 of file RootPlotter1D.cpp.
void RootPlotter1D::plotRatio | ( | TString | plotDirectory, |
TString | plotOptions = "" , |
||
TPad * | pad = 0 , |
||
double | scaleFactor = 1.0 , |
||
double * | returnMin = 0 , |
||
double * | returnMax = 0 |
||
) |
Definition at line 191 of file RootPlotter1D.cpp.
void RootPlotter1D::plotWithPulls | ( | TString | plotDirectory, |
TString | plotOptions = "" , |
||
TPad * | pad = 0 |
||
) |
Definition at line 296 of file RootPlotter1D.cpp.
void RootPlotter1D::plotWithRatio | ( | TString | plotDirectory, |
TString | plotOptions = "" , |
||
TPad * | pad = 0 |
||
) |
Definition at line 169 of file RootPlotter1D.cpp.
|
protectedvirtual |
|
inline |
Definition at line 56 of file RootPlotter1D.h.
|
inline |
Definition at line 59 of file RootPlotter1D.h.
|
protected |
Definition at line 29 of file RootPlotter1D.h.
|
protected |
Definition at line 30 of file RootPlotter1D.h.
|
static |
Definition at line 50 of file RootPlotter1D.h.
|
static |
Definition at line 53 of file RootPlotter1D.h.