When using a TRatioPlot as such:
auto rp = new TRatioPlot(h1,h2); rp->Draw();
The upper pad plots h1 as a solid histogram, while h2 is plotted as individual points with error bars.
How do I plot h1 as well with error bars? (Ideally as a filled solid area like the Draw(“E3”); option).
I thought that extracting the histogram as such:
h1->SetName("top"); auto rp = new TRatioPlot(h1,h2); rp->Draw(); TObject* topObject = gr->GetUpperPad()->GetPrimitive("top"); TH1F* topGraph = (TH1F*)topObject; topGraph->Draw("E3 same");
Would work, but it does not. What is the correct way to do this?