# Is it possible to display a "turtle" .svg in the juno plot pane

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588>\
**Category:** New to Julia\
**Created:** [May 2, 2020, 12:19am UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588 "2020-05-02T00:19:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spence](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spence/32/14549_2.png) [@spence](https://discourse.julialang.org/u/spence)\
**Post date:** [May 2, 2020, 12:19am UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/1 "2020-05-02T00:19:01Z")

</div>

I’m going through the “Think Julia” book, I’m in chapter 4 creating turtle drawings. Is there a way to view my drawing in the Juno plot pane so I don’t have to go back and forth between Juno and my file manager to verify my output? I call my turtle functions through the svg macro:

@svg begin  
myTurtleDrawing()  
end

I would like to see it show up in the plot pane if possible similar to when you call plot().

Thanks.

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 3, 2020, 11:37pm UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/2 "2020-05-03T23:37:18Z")

</div>

What IDE are you using? Under Atom when I do the commands plots is updated with the image.

---

<div class="post-metadata">

**Author:** ![spence](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spence/32/14549_2.png) [@spence](https://discourse.julialang.org/u/spence)\
**Post date:** [May 4, 2020, 6:21pm UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/3 "2020-05-04T18:21:32Z")

</div>

I’m using Juno, here is my code, (i’ve tried it both in the REPL and running as a script):

```julia
using ThinkJulia

function polygon(t, n, len)
    angle = 360 / n 
    for i in 1:n    
        forward(t, len)
        turn(t, -angle)
    end
end

turtle = Turtle()
@svg begin
    polygon(turtle, 7, 70)
end

```

---

<div class="post-metadata">

**Author:** ![spence](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spence/32/14549_2.png) [@spence](https://discourse.julialang.org/u/spence)\
**Post date:** [May 4, 2020, 6:57pm UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/4 "2020-05-04T18:57:26Z")

</div>

I figured out that I think its trying to show the svg, I had the plot plane closed and ran the script and the plot plane immediately appeared but just blank.

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [May 4, 2020, 7:54pm UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/5 "2020-05-04T19:54:43Z")

</div>

Not sure what is happening…if you haven’t yet you might try restarting Julia and trying it again. Also if plots has scroll bars scroll to the right and down see if the image is just hiding.

Other than that maybe try (in a new session):

```julia
Pkg.add("Luxor")
using Luxor
@svg begin sethue("red"); circle(-200, -200, 20, :fill) end

```

Luxor appears to be the package ThinkJulia is using to do the turtle. That code should use it to draw a red circle in plots.

---

<div class="post-metadata">

**Author:** ![spence](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spence/32/14549_2.png) [@spence](https://discourse.julialang.org/u/spence)\
**Post date:** [May 4, 2020, 8:26pm UTC](https://discourse.julialang.org/t/is-it-possible-to-display-a-turtle-svg-in-the-juno-plot-pane/38588/6 "2020-05-04T20:26:03Z")

</div>

interesting, I wonder if its Juno. Your code produces an svg just fine and the plot pane “shows it” (in that I can “forget” the plot by pressing the x button) but its just blank. The svg file shows up in my file tree and I can view the red circle with an image viewer. It probably has something do with the this method error I get in the linter after running your code: (but the process completes successfully?):

`Error	Julia	: MethodError(convert, (Symbol, :($(Expr(:., :Luxor)))), 0x00000000000069ff)`

thanks for the help on such a trivial thing!
