How to Use the Graphics Editor


ROOT has a simple built-in graphics editor to draw and edit basic primitives starting from an empty canvas or on top of a picture (eg. histogram).

The editor is started by selecting the Editor item in the canvas Edit menu. A menu appears into an independent window ( see in the picture below).

You can create the following graphics objects:

You can edit an existing object in a canvas by clicking with the right moose button on this object. A pop-up menu is shown with a list of possible actions on this object. You will notice that most graphics objects derive from one or several attribute classes TAttLine, TAttFill, TAttText or TAttMarker.

You can edit these attributes by selecting the corresponding item in the pop-up menu. For example selecting SetFillAttributes displays a panel with the color palette and fill area types. The name and class of the object being edited is shown in the bar title of the panel.

Once you are happy with your picture, you can select the Save as canvas.C item in the canvas File menu. This will automatically generate a macro with the C++ statements corresponding to the picture. This facility also works if you have other objects not drawn with the graphics editor (histograms for example). You can see the macro automatically generated from the canvas above.


Rene Brun, Fons Rademakers
Last update 12/01/97 by Rene Brun