TH1Manipulator.h
Go to the documentation of this file.
1 // TH1Manipulator.h
2 //
3 // David Adams
4 // November 2015
5 //
6 // Root macros to add top and/or right axis to the current pad.
7 //
8 // If histogram is specified, the axis attributes (tick size and
9 // # divisions) are taken from the histogram.
10 //
11 // After modifying plot range, repeat call to fix top/right axis.
12 
13 #ifndef TH1Manipulator_H
14 #define TH1Manipulator_H
15 
16 class TH1;
17 
19 
20 public:
21 
22  // Draw top x-axis and right y-axis.
23  // If ph != 0, axis attributes are taken from the histogram.
24  static int addaxis(TH1* ph =0);
25 
26  // Draw top x-axis with range taken from a histogram.
27  // If ph != 0, axis attributes are taken from the histogram.
28  static int addaxistop(TH1* ph =0);
29 
30  // Draw top x-axis with specified attributes.
31  static int addaxistop(double ticksize, int ndiv);
32 
33  // Draw right y-axis with range taken from a histogram.
34  // If ph != 0, axis attributes are taken from the histogram.
35  static int addaxisright(TH1* ph =0);
36 
37  // Draw right y-axis with specified attributes.
38  static int addaxisright(double ticksize, int ndiv);
39 
40  // Fix the BG color for 2D histos to be the same as the lowest color.
41  // Otherwise underflows look like zeros.
42  static int fixFrameFillColor();
43 
44 };
45 
46 #endif
static int addaxistop(TH1 *ph=0)
static int fixFrameFillColor()
static int addaxis(TH1 *ph=0)
static int addaxisright(TH1 *ph=0)