TLegend* legend = new TLegend(0.1, 0.7, 0.48, 0.9); legend->SetHeader("Legend Title","C");
TLegend* legend = new TLegend(0.5, 0.2, 0.9, 0.4); legend->SetHeader("My Legend");In this example, a TLegend object is created again to be positioned and sized within a visualization window. The SetHeader method is used to set the header of the legend to "My Legend" which will be left-justified by default. Overall, the SetHeader method is useful for label the contents of a TLegend object with informative text. This method is part of the ROOT package library which is a data analysis and visualization software environment written in C++.