


Each histogram having its own painter (rather than a central singleton painter painting all histograms), allows two histograms to be drawn in two threads without overwriting the painter's values. It is separated from the histogram so that one can have histograms without the graphics overhead, for example in a batch program. The THistPainter class specializes in the drawing of histograms. When the Draw() method of a histogram is called for the first time ( TH1::Draw), it creates a THistPainter object and saves a pointer to this "painter" as a data member of the histogram. THistPainter offers many options to paint 1D, 2D and 3D histograms. For instance to draw a 2D histogram as a lego plot it is enough to do: h->Draw("lego") To choose how the histogram will be drawn, the Draw() method can be invoked with an option. To draw a histogram h it is enough to do: h->Draw() In case of histograms, TH1::Paint invokes directly THistPainter::Paint. When the canvas has to be redrawn, the Paint function of each objects in the pad is called. Each histogram has a pointer to its own painter (to be usable in a multithreaded program). Histograms are drawn via the THistPainter class.

Setting Tick marks on the histogram axis.Setting line, fill, marker, and text attributes.Options supported for histograms' stacks (THStack).

Options supported for 1D and 2D histograms.Implements all histograms' drawing's options.
