# How to plot a legend with many names so that some of them don't get cut

**URL:** <https://discourse.julialang.org/t/how-to-plot-a-legend-with-many-names-so-that-some-of-them-dont-get-cut/78568>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [March 27, 2022, 7:12pm UTC](https://discourse.julialang.org/t/how-to-plot-a-legend-with-many-names-so-that-some-of-them-dont-get-cut/78568 "2022-03-27T19:12:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![askvorts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/askvorts/32/7120_2.png) [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Post date:** [March 27, 2022, 7:12pm UTC](https://discourse.julialang.org/t/how-to-plot-a-legend-with-many-names-so-that-some-of-them-dont-get-cut/78568/1 "2022-03-27T19:12:49Z")

</div>

In a `groupedbar` plot, I am trying to plot the legend for a list of 30 stock names. However, using `Plots`, some of the bottom names in the list (e.g. WMT) do not show up in the plot legend.

![ZYX](https://global.discourse-cdn.com/julialang/original/3X/0/3/034f9d9b705762090b1016e0f8c1949cfdac3f59.png)

How may I slightly “compress” the legend so that all stock names appear there?  
Thank you in advance!

---

<div class="post-metadata">

**Author:** ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Post date:** [March 27, 2022, 7:49pm UTC](https://discourse.julialang.org/t/how-to-plot-a-legend-with-many-names-so-that-some-of-them-dont-get-cut/78568/2 "2022-03-27T19:49:16Z")

</div>

You could try lowering the legend font size, but I don’t know if that will do anything to the boxes. You might also question the usefulness of that legend: that’s a lot of different categories, many of which have indiscernible colors. There is no way you could group them?

---

<div class="post-metadata">

**Author:** ![askvorts](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/askvorts/32/7120_2.png) [@askvorts](https://discourse.julialang.org/u/askvorts)\
**Post date:** [March 27, 2022, 8:35pm UTC](https://discourse.julialang.org/t/how-to-plot-a-legend-with-many-names-so-that-some-of-them-dont-get-cut/78568/3 "2022-03-27T20:35:14Z")

</div>

Yes, lowering the legend font size resizes the legend box. Thank you!
