Axis title with TGraphAsymErrors plus histograms

Dear experts,
I am trying to plot in the same canvas one TGraphAsymErrors and two histograms.
I would like to draw histograms before, so that the markers of my graph are not “covered” by the histograms.
However, if I do like this I cannot use the “A” option while drawing the graph, otherwise my histograms disappear.

Here is a snippet of my code:

c = r.TCanvas("c","c")
c.cd()
hMLBand.Draw("E2")
hMLRebin.Draw("HIST SAME")
rooHistAsimov.Draw("same AP")
c.SaveAs("plot.png")

if I change the graph draw option to “P” then I get all the items but not the axis title.
(I already read many root talk posts, but none of them solved my problems)

Can someone help me understand how to get all the drawables + axis title?

Thanks,
regards
Stefano

c = r.TCanvas("c","c")
hMLBand.Draw("E2")
hMLBand.GetXaxis()->SetTitle("X axis title");
hMLRebin.Draw("HIST SAME")
rooHistAsimov.Draw("P")
c.SaveAs("plot.png")

Great thanks! That works!

Stefano

Yes it should :slight_smile: