Hi, I was wondering whether anyone had some advice for me. I’m making 1 and 2d histograms in root, and while I found in the ROOT documentation how to insert a histogram title and axis titles for the one-dimensional histograms, the same syntax isn’t working for the 2d histograms. ROOT gives no error when I give it the same commands, but it doesn’t change the titles. I am assuming that a different syntax is more appropriate to how ROOT handles 2d histograms, but I can’t seem to find anything relevant in the documentation. Here is the code I’ve been using to make the 1d histograms:
tree->Draw(“variable>>h()”);
h->SetTitle(“HistTitle”);
h->GetXaxis()->(“XaxisTitle”);
h->GetYaxis()->(“YaxisTitle”);
Again, this works fine for the 1d histograms, but when I draw 2d histograms in this format:
tree->Draw(“var1:var2>>h_12()”);
and follow with similar title commands, I don’t get any result on the histogram.
I would appreciate any advice!