# Embedding plotting in a larger piece of code

**URL:** <https://discourse.julialang.org/t/embedding-plotting-in-a-larger-piece-of-code/1963>\
**Category:** Visualization\
**Created:** [February 7, 2017, 7:24pm UTC](https://discourse.julialang.org/t/embedding-plotting-in-a-larger-piece-of-code/1963 "2017-02-07T19:24:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [February 7, 2017, 7:24pm UTC](https://discourse.julialang.org/t/embedding-plotting-in-a-larger-piece-of-code/1963/1 "2017-02-07T19:24:45Z")

</div>

I am trying to include some plotting in a larger piece of code. Here is a very simple example:

using Plots  
plotly()  
x = linspace(0,7)  
plot(x,sin(x))

# 1+1

This works, but if I uncomment the last line, no plot appears. Am I doing something majorly wrong?

---

<div class="post-metadata">

**Author:** ![tbreloff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbreloff/32/68_2.png) [@tbreloff](https://discourse.julialang.org/u/tbreloff)\
**Post date:** [February 7, 2017, 7:27pm UTC](https://discourse.julialang.org/t/embedding-plotting-in-a-larger-piece-of-code/1963/2 "2017-02-07T19:27:08Z")

</div>

[https://juliaplots.github.io/output/](https://juliaplots.github.io/output/)

---

<div class="post-metadata">

**Author:** ![ko56](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ko56/32/2684_2.png) [@ko56](https://discourse.julialang.org/u/ko56)\
**Post date:** [February 7, 2017, 7:31pm UTC](https://discourse.julialang.org/t/embedding-plotting-in-a-larger-piece-of-code/1963/3 "2017-02-07T19:31:56Z")

</div>

Ah, thanks!
