TH1 not drawn but TH2 is

dear all,

this is a peculiar thing. just build root 5.32.02 on a ubuntu 11.10 i386 machine with the native libs of the distro. upon invoking TBrowser and double clicking on a TH1F, the Pad and the StatBox is drawn but NO data points. If I exercise the same with a TH2F object, the histogram is drawn just fine. Any hints on how I could trail the source of this behavior would be highly appreciated.



Can you, please, either attach your root file or (if you do not want to show data) save only 1d histogram you mentioned in a separate root file and attach this new file here? Thanks.

hi there,

see the two macros in the attachment. Both are auto-generated through TH1::SaveAs.

I am in doubt that the behaviour I described is caused by root itself. I have installed it on other machine in the same way and the framework bahved as expected. Thus, I suspect that some shared libs or header files included by root are skewed on this machine. Any hints on how to trace this are very welcome!

aTH2.C (14 KB)
aTH1.C (18 KB)

me again,

and before I forget about it, the interesting thing is, that TH1 is also not visible when “printed” to an .eps file.

again - I attached the two eps gained from the two macros of the previous post.

epsfiles.tgz (3.95 KB)

This is what a got after executing your aTH1.C macro. Both pdf and eps have the same conent.
What do you expect to have?


yes, I know … but if I do
$> root -n aTH1.C
I get a wonderfully blank window (see attached screenshot).

really weird.


yes, I know … but if I do
$> root -n aTH1.C

Ok, let it be
root -n aTH1.C.

I got the same picture.

May be, it’s time to ask you about your ROOT version and platform.

hi there,

OK, here are the some details …

> uname -a Linux kleener 3.0.0-17-generic-pae #30-Ubuntu SMP Thu Mar 8 17:53:35 UTC 2012 i686 i686 i386 GNU/Linux > lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric

$> root-config --version --config
5.32/02 linux --with-x11-libdir=/usr/lib/i386-linux-gnu --with-xft-libdir=/usr/lib/i386-linux-gnu --with-xext-libdir=/usr/lib/i386-linux-gnu --enable-roofit --enable-minuit2 --enable-mathmore --enable-python --enable-fftw3 --enable-tmva --enable-x11

I played around a bit and found out that I can run aTH1.C (see previous posts) and produce visible output if I drop the “hist” option from the TH1D::Draw invocations. then I get the attached screenshot.

Should I rebuild some packages of my root installation?


hi there again,

alright, I used the afs installation of root 5.32.02 by doing

$> . /afs/
$> . /afs/

the result is the same. no TH1 is drawn with the HIST option, if I drop it I get a picture (but not the one I wanted)!
this encourages my original suspicion that the cause of this behavior must be hidden in how root tries to access some libraries I have installed.


I ran your macro aTH1.C on my Ubuntu installation, using the latest ROOT version and for me it works fine too.
I installed ROOT from the sources .