There are four basic graphics primitives. They are the simple graphics objects which can be produced in ROOT. All the graphics produced by ROOT is a combination of them. They are located in the graf module.
Lines and polylines are created in ROOT using classes like TLine and TPolyLine. They allow to draw simple lines (TLine) or broken lines (TPolyLine) . The graphics attributes are the line color, the line style and the line width and are defined in a single dedicated object TAttLine. | ![]() |
The filled areas (polygons) have a similar structure as the polylines: a set of vertice. Therefore there is not specific class to make a fill polygon, TPolyLine is used with a specific option meaning it is a polygon. The graphics attributes for polygon are the color, and the type of filling (hollow, solid, patterns). These attributes are managed with TAttFill. | ![]() |
Markers and polymarkers are created in ROOT using classes like TMarker and TPolyMarker. They allow to draw one single marker (TMarker) or several (TPolyMarker). The graphics attributes are the marker color, the maker type and the marker size and are defined in a single dedicated object TAttMarker. | ![]() |
The basic graphics primitive to produce text is TText. The graphics attributes are the text color, the text font, the text size, the text angle, and the text alignment. These attributes are defined in the object TAttText. | ![]() |