You are here

The Graphics Pad

The ROOT graphics is build around the Graphics Pad concept (class TPad). A Graphics Pad is a linked list of primitives of any type (graphs, histograms, shapes, tracks, etc.). It is a kind of display list as shown on the following picture:


Adding an element into a Graphics Pad is done by the Draw() method of each classes. On the previous picture the Draw() method has been called on a 1D histogram, a 2D histogram, a graph and finally a pie chart. All these objects are now stored in the Graphics Pad's display list.

A Graphics Pad is painted by calling sequentially the Paint() method of each object in the list of primitives, as shown on the following picture:


The Graphics Pad's (re)painting does not need to be done explicitly by the ROOT user. It is done automatically at the end of a macro execution or when a Graphics Pad has been modified. 

In some cases a pad need to be painted during a macro execution, in order to refresh the graphics pad because of some data changes. That's typically the case of a data monitoring system. To force the pad painting do:



The list of primitives stored in the pad is also used to pick objects and to interact with them.