Possible bug in TTree::Draw()

Hi,

I believe this is a bug, but it may be my error. I am using “Version 4.00/08 11 October 2004”.

I cannot seem to get the TTree::Draw() method to plot a 2D histogram i.e. “x:y” in anything other than the “SCAT” configuration. If I try to use “LEGO” or “SURF” something very odd is produced. “CONT” and “COL” just reproduce the “SCAT” version.

Regards,
Mark

I Tried:

TFile f(“hsimple.root”)
ntuple->Draw(“px:py”,"",“CONT”);

All is fine for me… Have you an example showing the problem ?

Hi,

My mistake. This works for me too:

ntuple->Draw(“px:py”,"",“CONT”);

The problem is reproduced if you use:

ntuple->Draw(“px:py”,"","");

and then right click on the plotted histogram and chose SetDrawOption from the pop-up menu and input “lego” or “surf”.

Mark

What you see is normal. When you do:

ntuple->Draw(“px:py”,"","");

A TGraph is generated on screen not a TH2. The options you asked are TH2 options not TGrpah options. Do the first plot with a TH2 option and that will work how you expected.