# Show axis border when legend is outside plot

**URL:** <https://discourse.julialang.org/t/show-axis-border-when-legend-is-outside-plot/46970>\
**Category:** General Usage\
**Tags:** plotting\
**Created:** [September 20, 2020, 11:03pm UTC](https://discourse.julialang.org/t/show-axis-border-when-legend-is-outside-plot/46970 "2020-09-20T23:03:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [September 20, 2020, 11:03pm UTC](https://discourse.julialang.org/t/show-axis-border-when-legend-is-outside-plot/46970/1 "2020-09-20T23:03:02Z")

</div>

Hi all-

Is it possible to show the right y-axis border when placing the legend outside the plot? Thanks.

```julia
using Plots
pyplot()
plot(rand(10), legend = :outertopright)

```

---

<div class="post-metadata">

**Author:** ![AndiMD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andimd/32/6531_2.png) [@AndiMD](https://discourse.julialang.org/u/AndiMD)\
**Post date:** [September 22, 2020, 12:57pm UTC](https://discourse.julialang.org/t/show-axis-border-when-legend-is-outside-plot/46970/2 "2020-09-22T12:57:05Z")

</div>

`framestyle=:box` gives you borders around the plot, is this what you need? AFAIK the position of the legend has nothing to do with that.

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [September 23, 2020, 9:38am UTC](https://discourse.julialang.org/t/show-axis-border-when-legend-is-outside-plot/46970/3 "2020-09-23T09:38:12Z")

</div>

> [@AndiMD](#):
>
> framestyle=:box

Yes. Thank you!
