Plotting Helper
Functions | Classes | Enumerations
PlottingHelper Namespace Reference

The namespace of whole Plotting Helper utility. More...

Functions

Point Px2NDC (Point p)
 
void PlaceLegends (vector< TLegend * > legs, bool keepRange)
 Setup the position of legends provided in legs array. More...
 
void DrawLegends (vector< TLegend * > legs, bool keepRange)
 Draw legends provided in vector legs in such a way that there is no overlap. More...
 
Point Abs2Px (Point p, double scaleUp, double scaleDn)
 
Getters

Functions returning elements of the active frame

TH1 * GetFrame ()
 The method returns current frame on the active pad. More...
 
TAxis * GetXaxis ()
 Return x-axis of the active frame. More...
 
TAxis * GetYaxis ()
 Return y-axis of the active frame. More...
 
TAxis * GetZaxis ()
 Return z-axis of the active frame. More...
 
Units helpers

Functions to convert units and obtain axis fractions

double PxFontToRel (double px)
 Transform font size from px to the relative units. More...
 
double RelFontToPx (double rel)
 Transform font size from relative units to pixels. More...
 
double GetAxisFractionX ()
 Fraction of the pad width covered by x-axis. More...
 
double GetAxisFractionY ()
 Fraction of the pad height covered by y-axis. More...
 
double TickAbsToRelX (double tick)
 Convert tick length in px of x-axis to the relative units. More...
 
double TickAbsToRelY (double tick)
 Convert tick length in px of y-axis to the relative units. More...
 
Decorators

Functions to simply define text sizes, offsets and axis ticks

void SetFonts (double pxX, double pxY, double pxT)
 Set text size of x- and y-axis titles and labels to the frame title. More...
 
void SetTicks (double tickX, double tickY)
 Set ticks sizes of x and y-axis in px. More...
 
void SetLabelOffsetX (double off)
 Set offset of the x-axis labels. More...
 
void SetTitleOffsetX (double off)
 Set offset of the x-axis title. More...
 
void SetLabelOffsetY (double off)
 Set offset of the y-axis labels. More...
 
void SetTitleOffsetY (double off)
 Set offset of the y-axis title. More...
 
void SetFontsTicks (double px, double tickX, double tickY)
 Set of the fonts and ticks sizes. More...
 
void SetOffsets (double lX, double tX, double lY, double tY)
 Set offsets of x,y labels and titles. More...
 
void SetFTO (vector< double > fonts, vector< double > ticks, vector< double > offsets)
 Set Fonts, Ticks and Offsets. More...
 
Generalized titles

Functions to simplify drawing of latex captions related to the particular frame(s) Especially useful in case of describing complex grid of frames. For captions inside of frame consider also using of automatic legend. Conventional axis titles can be easily "reproduced" with these methods

void DrawLatex (TVirtualPad *pad1, TVirtualPad *pad2, double x, double y, TString text, double fSize, TString style)
 Draw latex in coordinates x,y give a hull of two frames in given TPads. More...
 
void DrawLatex (TVirtualPad *pad, double x, double y, TString text, double fSize, TString style)
 Draw latex at coordinates of the frame inside the corresponding TPad. More...
 
void DrawLatex (double x, double y, TString text, double fSize, TString style)
 Draw latex at coordinates of the frame corresponding to active TPad. More...
 
void DrawLatexUp (TVirtualPad *pad1, TVirtualPad *pad2, double Offset, TString text, double fSize, TString style)
 Draw latex up of frame1 and frame2. More...
 
void DrawLatexDown (TVirtualPad *pad1, TVirtualPad *pad2, double Offset, TString text, double fSize, TString style)
 Draw latex down of frame1 and frame2. More...
 
void DrawLatexRight (TVirtualPad *pad1, TVirtualPad *pad2, double Offset, TString text, double fSize, TString style)
 Draw latex right of frame1 and frame2. More...
 
void DrawLatexLeft (TVirtualPad *pad1, TVirtualPad *pad2, double Offset, TString text, double fSize, TString style)
 Draw latex left of frame1 and frame2. More...
 
void DrawLatexUp (TVirtualPad *pad, double Offset, TString text, double fSize, TString style)
 Draw latex up of frame corresponding to given pad. More...
 
void DrawLatexDown (TVirtualPad *pad, double Offset, TString text, double fSize, TString style)
 Draw latex down of frame corresponding to given pad. More...
 
void DrawLatexRight (TVirtualPad *pad, double Offset, TString text, double fSize, TString style)
 Draw latex right of frame corresponding to given pad. More...
 
void DrawLatexLeft (TVirtualPad *pad, double Offset, TString text, double fSize, TString style)
 Draw latex left of frame corresponding to given pad. More...
 
void DrawLatexUp (double Offset, TString text, double fSize, TString style)
 Draw latex up of frame corresponding to active pad. More...
 
void DrawLatexDown (double Offset, TString text, double fSize, TString style)
 Draw latex down of frame corresponding to active pad. More...
 
void DrawLatexRight (double Offset, TString text, double fSize, TString style)
 Draw latex right of frame corresponding to active pad. More...
 
void DrawLatexLeft (double Offset, TString text, double fSize, TString style)
 Draw latex left of frame corresponding to active pad. More...
 
Auto-legend

Functions to place lagend automaticaly and prevent overlaps

TString SetLayout (unsigned pos)
 Convert layout bit to string. More...
 
RectangleNDC GetNDC (TLatex *lat)
 Calculates positions and height and width of rectangle which encapsulates TLatex. More...
 
TLegend * newLegend (unsigned pos, int nCols)
 Define new legend at position pos with nCols columns. More...
 
void GetLegendSizes (TLegend *leg, double &SizeX, double &SizeY, double &SizeYroot)
 Calculates sizes of the legend in NDC. More...
 
Miscellaneous

Utilities for redraw axes, divde pad and auto y-range calculation

void UpdateFrame ()
 Redraw the current frame and axis ticks. More...
 
void CalcYaxisRange ()
 Calculate the automatic range of the vertical axis and apply it. More...
 
void SetLeftRight (double lMargin, double rMargin)
 Set simultaneously left and right margin of active pad. More...
 
void SetTopBottom (double tMargin, double bMargin)
 Set simultaneously top and bottom margin of active pad. More...
 
void DividePad (vector< double > xDivs, vector< double > yDivs)
 Construct the lattice of pads according to the provided x and y sizes. More...
 
void DivideTransparent (vector< double > divX, vector< double > divY, bool useMargins)
 Construct the lattice of frames according to the provided x and y sizes using transparency trick. More...
 
vector< double > merge (vector< double > v1, vector< double > v2, vector< double > v3, vector< double > v4, vector< double > v5, vector< double > v6, vector< double > v7)
 Merge vectors into one. More...
 
vector< double > repeat (vector< double > x, int n)
 Repeat the provided pattern. More...
 
vector< double > group (double frame, double space, int n)
 Construct group of frames. More...
 

Classes

struct  Point
 
struct  Rectangle
 Contains coordinates object rectangle envelope. More...
 
struct  RectangleNDC
 Struct containing NDC sizes and positions of the corresponding TLatex. More...
 

Enumerations

enum  {
  kPos1 = BIT(1), kPos2 = BIT(2), kPos3 = BIT(3), kPos4 = BIT(4),
  kPos5 = BIT(5), kPos6 = BIT(6), kPos7 = BIT(7), kPos8 = BIT(8),
  kPos9 = BIT(9), kPos2c = BIT(10), kPos4c = BIT(11), kPos6c = BIT(12),
  kPos8c = BIT(13)
}
 Enum with positions which are used for legend placing. More...
 

Detailed Description

The namespace of whole Plotting Helper utility.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Enum with positions which are used for legend placing.

The numbers corresponds to numeric keyboard on Nokia cell-phones It means 1 - top left, 3 top right 7 - bottom left, 9 bottom right the side positions 2,4,6,8 denotes that legend can be placed on arbitrary place along the side The kPos5 represents arbitrary position

Enumerator
kPos1 

Left top corner.

kPos2 

Top side.

kPos3 

Right top corner.

kPos4 

Left side.

kPos5 

Arbitrary position.

kPos6 

Right side.

kPos7 

Left bottom corner.

kPos8 

Bottom side.

kPos9 

Right bottom corner.

kPos2c 

Center of top side.

kPos4c 

Center of left side.

kPos6c 

Center of right side.

kPos8c 

Center of bottom side.

Definition at line 65 of file plottingHelper.h.

Function Documentation

◆ Abs2Px()

Point PlottingHelper::Abs2Px ( Point  p,
double  scaleUp,
double  scaleDn 
)

Definition at line 1204 of file plottingHelper.C.

◆ CalcYaxisRange()

void PlottingHelper::CalcYaxisRange ( )

Calculate the automatic range of the vertical axis and apply it.

Useful when several histograms are plotted to the same frame. In such case the y-range is normally chosen according to the one which is plotted first (without "same") This method select such a range which corresponds to union of all y-ranges When applying this method y-range is no more plotting order dependent

Definition at line 1439 of file plottingHelper.C.

◆ DividePad()

void PlottingHelper::DividePad ( vector< double >  xDivs,
vector< double >  yDivs 
)

Construct the lattice of pads according to the provided x and y sizes.

Comparing to classical Divide method this function left no empty space between frames but left spaces for axes. Note that without setting the offsets, font sizes and tics manually the ticks differs between pads. From this reason, we recommend calling SetFTO() in each pad The margins of the original pad are kept This method can be nested is some of the created pads needs additional subdivision. The resulting pads can be accessed by the standard cd() command as in ROOT Divide().

Parameters
xDivsvector defining horizontal sizes of frames, the absolute normalisation does not matter
yDivsvector defining vertical sizes of frames, the absolute normalisation does not matter

Definition at line 1559 of file plottingHelper.C.

◆ DivideTransparent()

void PlottingHelper::DivideTransparent ( vector< double >  divX,
vector< double >  divY,
bool  useMargins 
)

Construct the lattice of frames according to the provided x and y sizes using transparency trick.

This function creates set of transparent overlapping pads, each of them covering whole canvas. The margins of of of these pads are chosen in such a way that the lattice of frames is constructed. Comparing to the DividePad method this method allows to include spaces between plotted frames. In case that "zero" spaces are selected the frame structure would look the same only the axis would not be cut off by the frame edge. On the other hand one needs to ensure that nuisance exes are not plotted (i.e. setting their font size to 0). Note that argument vectors divX and divY must always contain odd number of elements (sizes). Comparing to DividePad method this method can be run several time for the same pad. In such a way more complex frame structure can be created than the regular lattice. The resulting pads can be accessed by the standard cd() command as in ROOT Divide(). In case of more calls on the same pad the indexes continues where there previous ended.

Parameters
xDivsvector defining horizontal sizes of frames and spaces between them, the absolute normalisation does not matter. The structure is the following {space, frame, space, frame, space} In case of useMargins=true the very left and right space is taken from pad margins.
yDivsthe same as xDivs but in vertical coordinate
useMarginsspecify wherever the current pad margins should be used.

Definition at line 1643 of file plottingHelper.C.

◆ DrawLatex() [1/3]

void PlottingHelper::DrawLatex ( TVirtualPad *  pad1,
TVirtualPad *  pad2,
double  x,
double  y,
TString  text,
double  fSize,
TString  style 
)

Draw latex in coordinates x,y give a hull of two frames in given TPads.

The rectangular hull of two frames corresponding to pad1 and pad2 is used as an NDC-like coordinate system For example the x-value starts from the most left side of frame1 and/or frame2 and ends in the most right side of these frames Note that in current implementation given pads cannot contain any sub-pad = there must be only one frame in pad1 and one frame in pad2.

Parameters
pad1The pad where the first frame is located
pad2The pad where the second frame is located (can be the same as pad1)
x,yNormalised coordinates between 0 and 1 defined by the hull of frame1 and frame2, 0,0 is on bottom left
textLatex which will be plotted, consider using #splitline #bf, #it, #font[], #color[].
fSizeFont size in pixels, by default the font size is taken from the title of the first frame.
styleThe text alignment and orientation. The text-orientation is defined by rotating of letter "v", that means "v,<,>,^". The default text alignment to the center horizontally and vertically. The text can be also aligned to the left "l" or right "r", vertically to the bottom "b" or top "t"

Definition at line 422 of file plottingHelper.C.

◆ DrawLatex() [2/3]

void PlottingHelper::DrawLatex ( TVirtualPad *  pad,
double  x,
double  y,
TString  text,
double  fSize,
TString  style 
)

Draw latex at coordinates of the frame inside the corresponding TPad.

For description see the DrawLatex method, here only the one pad is provided

Definition at line 537 of file plottingHelper.C.

◆ DrawLatex() [3/3]

void PlottingHelper::DrawLatex ( double  x,
double  y,
TString  text,
double  fSize,
TString  style 
)

Draw latex at coordinates of the frame corresponding to active TPad.

The same as DrawLatex but used for active pad

Definition at line 546 of file plottingHelper.C.

◆ DrawLatexDown() [1/3]

void PlottingHelper::DrawLatexDown ( TVirtualPad *  pad1,
TVirtualPad *  pad2,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex down of frame1 and frame2.

Definition at line 616 of file plottingHelper.C.

◆ DrawLatexDown() [2/3]

void PlottingHelper::DrawLatexDown ( TVirtualPad *  pad,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex down of frame corresponding to given pad.

Definition at line 637 of file plottingHelper.C.

◆ DrawLatexDown() [3/3]

void PlottingHelper::DrawLatexDown ( double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex down of frame corresponding to active pad.

Definition at line 657 of file plottingHelper.C.

◆ DrawLatexLeft() [1/3]

void PlottingHelper::DrawLatexLeft ( TVirtualPad *  pad1,
TVirtualPad *  pad2,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex left of frame1 and frame2.

Definition at line 626 of file plottingHelper.C.

◆ DrawLatexLeft() [2/3]

void PlottingHelper::DrawLatexLeft ( TVirtualPad *  pad,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex left of frame corresponding to given pad.

Definition at line 647 of file plottingHelper.C.

◆ DrawLatexLeft() [3/3]

void PlottingHelper::DrawLatexLeft ( double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex left of frame corresponding to active pad.

Definition at line 665 of file plottingHelper.C.

◆ DrawLatexRight() [1/3]

void PlottingHelper::DrawLatexRight ( TVirtualPad *  pad1,
TVirtualPad *  pad2,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex right of frame1 and frame2.

Definition at line 621 of file plottingHelper.C.

◆ DrawLatexRight() [2/3]

void PlottingHelper::DrawLatexRight ( TVirtualPad *  pad,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex right of frame corresponding to given pad.

Definition at line 642 of file plottingHelper.C.

◆ DrawLatexRight() [3/3]

void PlottingHelper::DrawLatexRight ( double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex right of frame corresponding to active pad.

Definition at line 661 of file plottingHelper.C.

◆ DrawLatexUp() [1/3]

void PlottingHelper::DrawLatexUp ( TVirtualPad *  pad1,
TVirtualPad *  pad2,
double  Offset,
TString  text,
double  fSize,
TString  style 
)

Draw latex up of frame1 and frame2.

Draw the latex above the frames 1 and 2. The Offset is in units of text height of text. It is exactly the same unit as used for the title offsets

Definition at line 611 of file plottingHelper.C.

◆ DrawLatexUp() [2/3]

void PlottingHelper::DrawLatexUp ( TVirtualPad *  pad,
double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex up of frame corresponding to given pad.

Definition at line 632 of file plottingHelper.C.

◆ DrawLatexUp() [3/3]

void PlottingHelper::DrawLatexUp ( double  Offset,
TString  text,
double  fSize = -1.0,
TString  style = "" 
)

Draw latex up of frame corresponding to active pad.

Definition at line 653 of file plottingHelper.C.

◆ DrawLegends()

void PlottingHelper::DrawLegends ( vector< TLegend * >  legs,
bool  keepRange 
)

Draw legends provided in vector legs in such a way that there is no overlap.

in case that keepRange=true the y-axis range is not touch even if the amount of space is not sufficiend. The keepRange=true is very useful when a grid of histograms is plotted

Definition at line 916 of file plottingHelper.C.

◆ GetAxisFractionX()

double PlottingHelper::GetAxisFractionX ( )

Fraction of the pad width covered by x-axis.

Definition at line 191 of file plottingHelper.C.

◆ GetAxisFractionY()

double PlottingHelper::GetAxisFractionY ( )

Fraction of the pad height covered by y-axis.

Definition at line 198 of file plottingHelper.C.

◆ GetFrame()

TH1 * PlottingHelper::GetFrame ( )

The method returns current frame on the active pad.

Useful for example to set maximum of the y-axis, GetFrame()->SetMaximum(5)

Definition at line 92 of file plottingHelper.C.

◆ GetLegendSizes()

void PlottingHelper::GetLegendSizes ( TLegend *  leg,
double &  SizeX,
double &  SizeY,
double &  SizeYroot 
)

Calculates sizes of the legend in NDC.

Note that due to the bug in root the y-size to be set to TLegend object is sometimes diffrent than the real size

Definition at line 775 of file plottingHelper.C.

◆ GetNDC()

RectangleNDC PlottingHelper::GetNDC ( TLatex *  lat)

Calculates positions and height and width of rectangle which encapsulates TLatex.

Works well for 4 basic orientation, 0,90,180,270 degree. Does not work for properly for vertical alignment to the bottom of the line

Definition at line 709 of file plottingHelper.C.

◆ GetXaxis()

TAxis * PlottingHelper::GetXaxis ( )

Return x-axis of the active frame.

Definition at line 131 of file plottingHelper.C.

◆ GetYaxis()

TAxis * PlottingHelper::GetYaxis ( )

Return y-axis of the active frame.

Definition at line 137 of file plottingHelper.C.

◆ GetZaxis()

TAxis * PlottingHelper::GetZaxis ( )

Return z-axis of the active frame.

Definition at line 143 of file plottingHelper.C.

◆ group()

vector< double > PlottingHelper::group ( double  frame,
double  space,
int  n 
)

Construct group of frames.

Returns vector describing layout of n identical frames which are separated by the same space size The spaces before first space and after last frame are not included

Definition at line 1759 of file plottingHelper.C.

◆ merge()

vector< double > PlottingHelper::merge ( vector< double >  v1,
vector< double >  v2,
vector< double >  v3,
vector< double >  v4,
vector< double >  v5,
vector< double >  v6,
vector< double >  v7 
)

Merge vectors into one.

In current version up to 7 vectors can be merged

Definition at line 1735 of file plottingHelper.C.

◆ newLegend()

TLegend * PlottingHelper::newLegend ( unsigned  pos,
int  nCols 
)

Define new legend at position pos with nCols columns.

The text size is set to be the same as the size of y-axis title All this values can be changed later on manually, like leg->SetTextSize(1.3*leg->GetTextSize())

Definition at line 756 of file plottingHelper.C.

◆ PlaceLegends()

void PlottingHelper::PlaceLegends ( vector< TLegend * >  legs,
bool  keepRange 
)

Setup the position of legends provided in legs array.

Note that the legends must be drawn manually To draw legends directly, use DrawLegends

Definition at line 847 of file plottingHelper.C.

◆ Px2NDC()

Point PlottingHelper::Px2NDC ( Point  p)

Definition at line 1227 of file plottingHelper.C.

◆ PxFontToRel()

double PlottingHelper::PxFontToRel ( double  px)

Transform font size from px to the relative units.

The returned size is dependent on the currently active pad - the gPad pointer

Parameters
pxThe font size in px
Returns
The font size in relative units

Definition at line 161 of file plottingHelper.C.

◆ RelFontToPx()

double PlottingHelper::RelFontToPx ( double  rel)

Transform font size from relative units to pixels.

The returned size is dependent on the currently active pad - the gPad pointer

Parameters
relThe font size in relative units
Returns
The font size in pixels

Definition at line 181 of file plottingHelper.C.

◆ repeat()

vector< double > PlottingHelper::repeat ( vector< double >  x,
int  n 
)

Repeat the provided pattern.

Returns the vector which includes n times the vector x

Definition at line 1747 of file plottingHelper.C.

◆ SetFonts()

void PlottingHelper::SetFonts ( double  pxX,
double  pxY,
double  pxT 
)

Set text size of x- and y-axis titles and labels to the frame title.

Note that the Canvas width and height is specified in TCanvas constructor. The font size is defined as the height of envelope between "gh" characters The height of numbers is for example 3/4 of the font size.

Definition at line 230 of file plottingHelper.C.

◆ SetFontsTicks()

void PlottingHelper::SetFontsTicks ( double  px,
double  tickX,
double  tickY 
)

Set of the fonts and ticks sizes.

Set size of x-,y-axis labels and titles to px (in pixels). In addition the x and y tick lengths can be specified

Definition at line 362 of file plottingHelper.C.

◆ SetFTO()

void PlottingHelper::SetFTO ( vector< double >  fonts,
vector< double >  ticks,
vector< double >  offsets 
)

Set Fonts, Ticks and Offsets.

Set up fonts sizes, ticks length and titles/labels offsets All parameters are given as vectors, call as SetFTO({14}, {5}, {1.3, 2.3, 0.3, 2.3});

Definition at line 386 of file plottingHelper.C.

◆ SetLabelOffsetX()

void PlottingHelper::SetLabelOffsetX ( double  off)

Set offset of the x-axis labels.

The zero offset correspond to labels "standing" on top of the x-axis. The offset is measured in units corresponds to height of numbers like "012..." Therefore offset 1 correspond to labels touching x-axis by from the bottom.

Definition at line 270 of file plottingHelper.C.

◆ SetLabelOffsetY()

void PlottingHelper::SetLabelOffsetY ( double  off)

Set offset of the y-axis labels.

The zero offset corresponds to labels touching the y-axis from the left The offset is measured in units corresponds to height of numbers like "012..." I.e. the width of 0 if lying. The label text size must be set before offset!

Definition at line 323 of file plottingHelper.C.

◆ SetLayout()

TString PlottingHelper::SetLayout ( unsigned  pos)

Convert layout bit to string.

Used to setup the position of particular TLegend by SetName For example leg->SetName(SetLayout(kPos1)) for legend in to top left Used internally by newLegend

See also
newLegend()
Parameters
posthe position bit, for instance kPos2 | kPos8
Returns
the number printed in decadic base to the string

Definition at line 687 of file plottingHelper.C.

◆ SetLeftRight()

void PlottingHelper::SetLeftRight ( double  lMargin,
double  rMargin 
)

Set simultaneously left and right margin of active pad.

Implemented to avoid the bug in ROOT which causes that gPad->SetLeftMargin(0.5); gPad->SetRightMargin(0.1); is not always the same as gPad->SetRightMargin(0.1); gPad->SetLeftMargin(0.5);

Definition at line 1521 of file plottingHelper.C.

◆ SetOffsets()

void PlottingHelper::SetOffsets ( double  lX,
double  tX,
double  lY,
double  tY 
)

Set offsets of x,y labels and titles.

Note that root is using different alignment of labels and titles We don't try to correct for that as we assume that in general the actual form of the title can be specified later The title's and label's text sizes must be set before offsets!

Definition at line 374 of file plottingHelper.C.

◆ SetTicks()

void PlottingHelper::SetTicks ( double  tickX,
double  tickY = -1 
)

Set ticks sizes of x and y-axis in px.

Definition at line 254 of file plottingHelper.C.

◆ SetTitleOffsetX()

void PlottingHelper::SetTitleOffsetX ( double  off)

Set offset of the x-axis title.

The zero offset corresponds to title which is intersect by the x-axi in its middle. The offset is measured in units corresponds to height of numbers like "012..." Therefore offset 0.5 corresponds to numeric title touching x-axis by from the bottom. Note that the height of numbers is 3/4 of the font size (height) which is defined by the gh vertical envelope. It means that if title contains h, offset 4/3 * 0.5 would result of "h" touching axis The title text size must be set before offset!

Definition at line 306 of file plottingHelper.C.

◆ SetTitleOffsetY()

void PlottingHelper::SetTitleOffsetY ( double  off)

Set offset of the y-axis title.

The zero offset corresponds to title which is intersect by the y-axis in its middle. The offset is measured in units corresponds to height of numbers like "012..." Note that the height of numbers is 3/4 of the font size (height) which is defined by the gh vertical envelope. The title text size must be set before offset!

Definition at line 349 of file plottingHelper.C.

◆ SetTopBottom()

void PlottingHelper::SetTopBottom ( double  tMargin,
double  bMargin 
)

Set simultaneously top and bottom margin of active pad.

Implemented to avoid the bug in ROOT which causes that gPad->SetTopMargin(0.5); gPad->SetBottomMargin(0.1); is not always the same as gPad->SetBottomMargin(0.1); gPad->SetTopMargin(0.5);

Definition at line 1535 of file plottingHelper.C.

◆ TickAbsToRelX()

double PlottingHelper::TickAbsToRelX ( double  tick)

Convert tick length in px of x-axis to the relative units.

Definition at line 205 of file plottingHelper.C.

◆ TickAbsToRelY()

double PlottingHelper::TickAbsToRelY ( double  tick)

Convert tick length in px of y-axis to the relative units.

Definition at line 213 of file plottingHelper.C.

◆ UpdateFrame()

void PlottingHelper::UpdateFrame ( )

Redraw the current frame and axis ticks.

Useful if the original ticks were covered during plotting

Definition at line 1418 of file plottingHelper.C.