# Gadfly: how to add a legend to stacked plots?

**URL:** <https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955>\
**Category:** General Usage\
**Created:** [June 5, 2019, 10:57am UTC](https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955 "2019-06-05T10:57:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike\_k](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mike_k/32/211864_2.png) [@mike\_k](https://discourse.julialang.org/u/mike_k)\
**Post date:** [June 5, 2019, 10:57am UTC](https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955/1 "2019-06-05T10:57:50Z")

</div>

Dear folks,

suppose we have two figures `figA` and `figB` which have the same legend. Is it possible to stack them together, e.g.,

```julia
newFig = hstack(figA, figB)

```

and to add only one legend to `newFig` afterwards (in my case centered in the bottom)?

Thank you in advance,  
mike\_k

---

<div class="post-metadata">

**Author:** ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Post date:** [July 4, 2019, 6:54pm UTC](https://discourse.julialang.org/t/gadfly-how-to-add-a-legend-to-stacked-plots/24955/2 "2019-07-04T18:54:19Z")

</div>

what’s wrong with adding `Theme(key_position=:none)` to FigA?
