# Code was trapped at display(plt) step

**URL:** <https://discourse.julialang.org/t/code-was-trapped-at-display-plt-step/98013>\
**Category:** Visualization\
**Tags:** plots\
**Created:** [April 27, 2023, 8:09pm UTC](https://discourse.julialang.org/t/code-was-trapped-at-display-plt-step/98013 "2023-04-27T20:09:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jianqixi](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@jianqixi](https://discourse.julialang.org/u/jianqixi)\
**Post date:** [April 27, 2023, 8:09pm UTC](https://discourse.julialang.org/t/code-was-trapped-at-display-plt-step/98013/1 "2023-04-27T20:09:45Z")

</div>

Hi I am trying to use Plots.jl with default backends GR to plot figures. But the code was trapped in the display(plt) process. Any ideas about what happened? Thank you

Here is my code:

plt=scatter3d(tar\_xs,tar\_ys,tar\_zs, marker\_z=tar\_zs, markercolor = :vikO, markerstrokewidth=0, markersize=5, markershape=:rect, right\_margin = 10Plots.mm)  
display(plt)  
println(“Hello”)

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [April 27, 2023, 9:28pm UTC](https://discourse.julialang.org/t/code-was-trapped-at-display-plt-step/98013/2 "2023-04-27T21:28:16Z")

</div>

With the following input data, your code works just fine:

```julia
using Plots; gr()
tar_xs = tar_ys = tar_zs = 1:20
plt=scatter3d(tar_xs,tar_ys,tar_zs, marker_z=tar_zs, markercolor=:vikO, markerstrokewidth=0, ms=5, markershape=:rect, right_margin=10Plots.mm)
display(plt)
println("Hello")

```

**NB:**  
Provide a MWE and use triple backticks around your code:  
```  
type the code here  
```

How big are your tar arrays?
