Output doesn't show plots

You could try this. In this scenario, the program will wait for you to push enter to quit. Now you can run the program as before. julia programfile.jl.

using Plots
arr = [1.2, 1.4, 1.5, 1.1]
x = [1, 2, 3, 4]
p = scatter(x, arr)
display(p)
println("Press the enter key to quit:")
readline()

We do not usually recommend executing a Julia program from the command line like that during development because you will incur latency each time you run it.

It is not clear to me how you are trying to redisplay the plot or replot. It sounds like you may be closing the window that pops up and that you are not using VSCode.

using Revise, Plots

function makeplot()
    arr = [1.2, 1.4, 1.5, 1.1]
    x = [1, 2, 3, 4]
    p = scatter(x, arr)
    display(p)
    return p
end

p = makeplot()

if !Base.isinteractive()
    println("Press the enter key to quit:")
    readline()
end

To redisplay the plot in interactive mode,

julia> display(p)

To replot, try this:

julia> p = makeplot()

There is some function to force a new window in thr default GR backend.

Anothe alternative would be to try Makie.jl