PlottI
 All Classes Files Functions Variables Enumerations Enumerator Pages
PlottI Documentation

Table of Contents

PlottI - Plotting Interface for easy plotting of your data.

Canvasses

For your perfect plot you first need a Canvas, that will display your beautiful data.

The (virtual) base class Plot includes most basic plotting functionalities. It provides a canvas and a default main pad, as well as basic set up variables such as canvas dimensions. For your very own plot you should one of the provided derived classes that implement one type of plot, e.g. a simple SquarePlot or a SingleRatioPlot, or derive your own class. The basic dimensions and offsets are already predefined but can be changed manually with the corresponding methods. You create a canvas by calling the corresponding constructor with one or more TObjArrays containing the objects you want to plot and the corresponding axis titles. After the construction you can adjust your canvas or histogram settings (cf. section Settings for Canvasses) and plot everything with the Draw method (this will automatically save the canvas with the given name).

Settings for Canvasses

The following options are available for Canvasses:

Settings marked with * are static and will be used for all following canvasses (in your macro) as well until they are manually changed.

Draw Options

The draw options for your plottable objects can be set in various ways via the SetOptions function:

If you only want to manipulate one option at a time, you can do so via the SetOption function:

If you don't manually set any options the default option "SAME" will be used.

Settings for Histograms

You can choose the style and colors of the plotted objects by either calling the Set<Object>Properties method on each histogram beforehand or set arrays containing these settings that will be used for all plots (until they are changed) by calling SetStyle. You can set an offset for the ratio markers, meaning for offset = 2 the first ratio marker will have the properties defined by the third array entry. The default offset is one, assuming that the ratio is to the first histogram in the array then the colors will correspond to those used in the main plot. In the case that some of your style arrays are empty or don't contain enough elements, default settings for the markers and lines will be used: marker size and line width 2., line style 1 (straight line), marker style kFullCircle and marker color kBlack. It is also possible to automatically pick colors from a color palette. To do this, use the SetPalette function to choose a palette and draw then set the histogram draw options to "PMC PLC PFC".

The Draw() Function

Once the canvas is created with the corresponding constructor and you applied all your settings you can finalise your plot by calling the Draw() function of the class you are using.
This function will save the final plot, but it will also delete the canvas from the program so it is not possible to access it after the Draw() option has been called.

Legends

The Legend class can be used to automatically create a legend from data or text. You have the following options

Colors

This interface provides two functionalities for using personalised colors in your plots:

  1. The structure color can be used to define colors from RGB values. It includes an automatically generated ROOT color index.
  2. The class ColorGradient can be used to generate a palette (color gradient) from color endpoints, defined using the above mentioned structure.

For more information on colors and predefined colors and palettes see page Colors.

Functionality

The following additional functionalities are currently available (in the file functionality.h):