Home | News | Documentation | Download

Plotting projections on different canvases

Hello Everyone!
I have a short question. I am plotting all the projections in one Canvas, However, I want to find a way in which I can plot all the projections one by one on different canvases.

For example, In the png attached all the projections are in one place, I want to know how to make each of them in a different canvas?
My code is like this

TCanvas *c1 = new TCanvas ("c1", "c1", 1800, 1200); c1->Divide(3,3);

If anyone has some idea about it, Kindly let me know.

Thank you
Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

Maybe something like this:

for (int ibin = 0; ibin < 9; ibin++) {
  TCanvas *c = new TCanvas(TString::Format("c_%d", ibin + 1), // name
                           TString::Format("c_%d", ibin + 1), // title
                           1800, 1200);
  px_slices[ibin]->Draw("HIST"); // assumes you have a "px_slices[9]" array

Thank you very much Wile_E_Coyote. Appreciated.