TCanvas::Divide

Pasha Murat (murat@cdfsga.fnal.gov)
Tue, 3 Jun 1997 17:33:23 GMT


When canvas "page" is divided into several regions (pads),
the pads are defined as a set of simple variables with their names being
"page_1", "page_2" etc. A typical task which uses division of a canvas
consists in filling a set(usually - array) of histograms plotting them.

Suppose one has filled an array of histograms: TH1F* hist[8];
and has divided a canvas into 8 pads : page->Divide(2,4);

Is there a simple way to plot histograms in a loop with each histogram placed
on its own pad? To the moment it seems to me to be kind of cumbersome
operation.

Alternatively one could think of creating an array of pads, for example
"page_pad[2][4]" or "page_pad[8]" when dividing a canvas. This would
allow to loop over the pads.

Thanks, Pasha.