Making labels easier to read for string name bins in TH1 (flip xy in drawing?)

ROOT Version: v6.24.06

I have string labels for bins that I would prefer over just seeing the numbers. A common problem with text on tick labels is poor spacing, however, TH2 can easily have labels on the y axis, so I imagine that drawing the axis’ text on y is doable for TH1 as well.

The way I’m hoping that ROOT supports is that everything is the same except I’d need a specifier to draw with x and y axes flipped while or before I call TH1::Draw. But if this isn’t the case, I’ll take any answer.

I went to work on something else and found something useful in the documentation.
Looking at the THistPainter options there is:

  • option “HBAR”, draws a 3D shaded view of the bars but is horizontal. Certainly not the typical style of my plots, but it would work as a quick fix
  • method PaintBarH(), I’ve not gotten it to work, but it seems like it’s a fair description for what I want.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.