Skip to content

Jonas fix xaxis title

Jonas Neundorf requested to merge jonas-fix-xaxis-title into master

Release notes

closes #400 (closed) by allowing to specify the axis label sizes in pixels.

Details

To use this feature, one has to first switch to a pixel-precise font (i.e. number ending in 3, cf. TAttText documentation) using

plotter.geometry.font: 43

The font size can be adjusted for x and y axis simultaneously. However, since the offset is still specified in percent of the pad size (whatever that is, the ROOT developers don't seem to know either), it has to be adjusted separately for the x axis. Similarly, the number of markers on the y axis of the subplot has to be adjusted (see TAttAxis documentation for details). The values below work for me when using the TQDefaultPlotter with the default canvas size and a ratio plot in the lower pad.

plotter.geometry.sub.height: 0.25
plotter.geometry.sub.margins.bottom: .5
plotter.geometry.sub.xAxis.titleOffset: 4.5
plotter.geometry.textSize: 28
plotter.geometry.font: 43
plotter.style.sub.ndivisions: 503

Attached a sample plot. Note that the axis label offset is slightly different between main and subpad. run2-mm-CutDYjj_CRDilep-METsig-lin

Merge request reports