# Warning from TLegend and how to solve it

**URL:** <https://root-forum.cern.ch/t/warning-from-tlegend-and-how-to-solve-it/64835>\
**Category:** ROOT\
**Tags:** graphics, root\
**Created:** [May 7, 2026, 10:24pm UTC](https://root-forum.cern.ch/t/warning-from-tlegend-and-how-to-solve-it/64835 "2026-05-07T22:24:04Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [May 8, 2026, 11:36am UTC](https://root-forum.cern.ch/t/warning-from-tlegend-and-how-to-solve-it/64835/11 "2026-05-08T11:36:37Z")

</div>

```cpp
    // ...
    for (size_t i = 0; i < Get_E().size(); i++)
    // ...
    gr2->Draw("P");
    // ...
    leg->Draw();
    // ...

```

---

_[View the full topic](https://root-forum.cern.ch/t/warning-from-tlegend-and-how-to-solve-it/64835)._
