TLegend is a class in the ROOT package library used for displaying legends in C++ graphics applications.
The Clear method is used to remove all entries from the legend.
Code example:
```c++
// create a TLegend object
TLegend* leg = new TLegend(0.6, 0.7, 0.9, 0.9);
leg->AddEntry(h1, "Histogram 1", "l");
leg->AddEntry(h2, "Histogram 2", "l");
leg->AddEntry(h3, "Histogram 3", "l");
leg->Draw();
// clear the legend entries
leg->Clear();
```
In this example, a TLegend object is created and initialized with three entries. The Draw method is called to display the legend. Then, the Clear method is used to remove all entries from the legend.
Package library: ROOT.
C++ (Cpp) TLegend::Clear - 30 examples found. These are the top rated real world C++ (Cpp) examples of TLegend::Clear extracted from open source projects. You can rate examples to help us improve the quality of examples.