Clear cache Julia REPL, plots

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?

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.

This is the code I tried:

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: