# Clear cache Julia REPL, plots

**URL:** https://discourse.julialang.org/t/clear-cache-julia-repl-plots/111297
**Category:** General Usage
**Tags:** repl, plots, makie, glmakie, pythonplot
**Created:** [March 7, 2024, 1:47pm UTC](https://discourse.julialang.org/t/clear-cache-julia-repl-plots/111297 "2024-03-07T13:47:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Enlil50](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/enlil50/32/206539_2.png) [@Enlil50](https://discourse.julialang.org/u/Enlil50)
#### Post date: [March 7, 2024, 1:47pm UTC](https://discourse.julialang.org/t/clear-cache-julia-repl-plots/111297/1 "2024-03-07T13:47:04Z")

</div>

I noted that with GLMakie, Plots and PythonPlot, when I open julia repl and run include"name\_file.jl") to visualize a plot, axis stack one on top of the other. Some times this happens with legends too.

Any way to clear the image cache, but too leave the nclude packages cache intact?

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [March 7, 2024, 2:22pm UTC](https://discourse.julialang.org/t/clear-cache-julia-repl-plots/111297/2 "2024-03-07T14:22:52Z")

</div>

Could you give a runnable example of what you mean?

In general in Plots and Makie if you do `scatter!` it will plot onto the currently active figure, while `scatter` will create a new figure.

---

<div class="post-metadata">

### Author: ![Enlil50](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/enlil50/32/206539_2.png) [@Enlil50](https://discourse.julialang.org/u/Enlil50)
#### Post date: [March 7, 2024, 10:49pm UTC](https://discourse.julialang.org/t/clear-cache-julia-repl-plots/111297/3 "2024-03-07T22:49:19Z")

</div>

This is the code I tried:

```julia
using PythonPlot

x = [1, 2]
y = Float64[1.01, 1.02]

fig1 = pyplot.figure(1)
ax1 = fig1.add_subplot(1, 1, 1)
plot(x, y, '.')
pyplot.suptitle(L"title", fontsize=12)
ax1.set_ylabel(L"x \ axis", fontsize=12)
ax1.set_xlabel(L"y \ axis", fontsize=12)

```

I attach a screen recording:
