Text drawing option problem

Dear rooters,

I just noticed a problem with “text” option for a ntuple drawning.
I attach a very simple text file (test.txt) composed of 3 columns x,y,z (and 16 lines).
Here what I have done:
TNtuple *nt = new TNtuple(“nt”,“nt”,“x:y:z”)
As you can see on the plot all the values of z are printed except when z=0
where no value is printed. I am not sure if this is a normal behavior of the
text option…
Does someone has an idea of what is going on?

By advance thank you

I am running root Version 5.32/00 under Mac Os X Lion 10.7.3

test.txt (119 Bytes)

See the help here: root.cern.ch/root/html/THistPainter.html#HP15

Thank you for your fast reply but using
give me a plot with too much 0.
Is there an alternative between no 0. and too much 0. :slight_smile:
thank you

That’s why by default we do not show them

Well… how would you define the zeros you want to see and those you do not want ?
a 0 is a 0 …

yes this is a good point …
but I would like to have only the 0 read from file .
Nevermind I will do by an other way
Thank you very much

Yes … but a 0 from the file is the same zero as an empty bin … :slight_smile:

Hi there,

It would be nice the “hide 0” feature be available for 1D histograms too (i.e. not to draw the text above bins whose content is zero) which is not the case for the time being:

TH1D * histo = new TH1D ("histo","",20,-5.,5.) ; histo->FillRandom("gaus",1000) ; //gStyle->SetHistMinimumZero(kFALSE) ; /// kFALSE, kTRUE histo->Draw("hist,text") ;Could you please implement it?



Thanks Olivier :smiley: