# How do I clear a plot using Plots?

**URL:** <https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996>\
**Category:** New to Julia\
**Created:** [July 30, 2019, 9:02pm UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996 "2019-07-30T21:02:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [July 30, 2019, 9:02pm UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996/1 "2019-07-30T21:02:13Z")

</div>

How do I clear plot in Atom? I know it is a very basic question, but I just can’t find the answer.

I am using the default backend which seems to be GR.

Kind regards

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [July 30, 2019, 9:15pm UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996/2 "2019-07-30T21:15:40Z")

</div>

Hi,

If you mean this kind of plot, then you have some buttons near the plot called “Forget plot”, etc.  
 ![Juno%20plots](https://global.discourse-cdn.com/julialang/original/3X/7/8/786b512b5e1d88ae5c7608703817dc20b51bf6cb.jpeg)

---

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [July 30, 2019, 9:23pm UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996/3 "2019-07-30T21:23:05Z")

</div>

Okay nice to know, that there is a way to do it manually, but how would I do it programmatically?

Currently, I am just doing “plot()” to make a new plot window, but just feels like there should be another way.

Kind regards

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [July 31, 2019, 5:15am UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996/4 "2019-07-31T05:15:50Z")

</div>

In order to do it programatically my approach is to use InspectDR package(which is based on Gtk). This creates plot windows that can be closed by a dedicated function, as the developer of the package explains in this topic:

> [@How to close InspectDR plot window or update it?](https://discourse.julialang.org/t/how-to-close-inspectdr-plot-window-or-update-it/25787):
>
> Hi, Sorry for the noob question, but I searched through some documentation and examples of InspectDR and could not figure out how to close a plot window. Can someone point me in the right direction, please? I’m sure I missed something. Thank you! Some info about my task: I am plotting hundreds of signals in order to label them(I have a small GUI that blocks plotting the next signal until I tell it to) so the screen will fill up with windows. I thought of two solutions for this: close window …

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Ahmed\_Salih](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ahmed_salih/32/206579_2.png) [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Post date:** [July 31, 2019, 6:46am UTC](https://discourse.julialang.org/t/how-do-i-clear-a-plot-using-plots/26996/5 "2019-07-31T06:46:57Z")

</div>

Yes it did, thank you very much. Will try to start using this package.

Kind regards
