# Output doesn't show plots

**URL:** <https://discourse.julialang.org/t/output-doesnt-show-plots/111092>\
**Category:** General Usage\
**Tags:** plot\
**Created:** [March 3, 2024, 2:56pm UTC](https://discourse.julialang.org/t/output-doesnt-show-plots/111092 "2024-03-03T14:56:15Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [March 4, 2024, 2:31pm UTC](https://discourse.julialang.org/t/output-doesnt-show-plots/111092/8 "2024-03-04T14:31:23Z")

</div>

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`.

```julia
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.

```julia
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-repl
julia> display(p)

```

To replot, try this:

```julia-repl
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

---

_[View the full topic](https://discourse.julialang.org/t/output-doesnt-show-plots/111092)._
