# How to add an inset to a plot

**URL:** <https://discourse.julialang.org/t/how-to-add-an-inset-to-a-plot/37189>\
**Category:** New to Julia\
**Tags:** question, plotting\
**Created:** [April 7, 2020, 7:48pm UTC](https://discourse.julialang.org/t/how-to-add-an-inset-to-a-plot/37189 "2020-04-07T19:48:49Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![BeastyBlacksmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/beastyblacksmith/32/4741_2.png) [@BeastyBlacksmith](https://discourse.julialang.org/u/BeastyBlacksmith)\
**Post date:** [April 9, 2020, 12:52pm UTC](https://discourse.julialang.org/t/how-to-add-an-inset-to-a-plot/37189/4 "2020-04-09T12:52:00Z")

</div>

```julia
plot( 1:5 )
plot!( -5:8, (-5:8).^2, inset = (1, bbox(0.1,0.0,0.4,0.4)), subplot = 2)

```

Where `1` is the subplot index where the inset should appear and `subplot = 2` assigns the correct subplot index to this series.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-an-inset-to-a-plot/37189)._
