# Problems with plotting in VSCode

**URL:** https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616
**Category:** New to Julia
**Created:** [July 31, 2021, 11:28pm UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616 "2021-07-31T23:28:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yenson-lau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yenson-lau/32/27690_2.png) [@yenson-lau](https://discourse.julialang.org/u/yenson-lau)
#### Post date: [July 31, 2021, 11:28pm UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616/1 "2021-07-31T23:28:53Z")

</div>

Here is the minimal working example to reproduce the issues. All I am trying to do here is create two plots with two lines each.  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/a/4a5b3a7b1681feb5c718063e31e16348f1e92a44.png)

Firstly, the linter produces warnings for the `plot()` calls even though the code works just fine. I have no way to get rid of it except to remove linting for calls altogether.

Secondly, if I try to run the entire script using the `Julia: Execute File in REPL` command, only the final plot shows up in the plot pane. In order for me to get both plots up, I need to run each section individually.

Here is my `versioninfo()`. I’m jusing the Julia extension on VSCode, v1.3.27. Thanks!

```julia
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, icelake-client)
Environment:
  JULIA_EDITOR = "/home/yenson/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/node"
  JULIA_NUM_THREADS =

```

---

<div class="post-metadata">

### Author: ![JaderAzevedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jaderazevedo/32/20508_2.png) [@JaderAzevedo](https://discourse.julialang.org/u/JaderAzevedo)
#### Post date: [August 1, 2021, 12:50am UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616/2 "2021-08-01T00:50:48Z")

</div>

You can try it:  
display(plot!(randn(5)) in the first plot.

---

<div class="post-metadata">

### Author: ![trilobit](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@trilobit](https://discourse.julialang.org/u/trilobit)
#### Post date: [August 1, 2021, 7:03am UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616/3 "2021-08-01T07:03:07Z")

</div>

A simple way:

```julia
using StatsPlots

serie1=rand(5)
serie2=rand(5)
serie3=rand(10)
serie4=rand(10)

plot(
   plot([serie1 serie2], label=["Serie1" "Serie2"]),
   plot([serie3 serie4], label=["Serie3" "Serie4"]),
   layout=(2,1), size=(800,400), grid=:off 
)

```

---

<div class="post-metadata">

### Author: ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)
#### Post date: [August 1, 2021, 7:54am UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616/4 "2021-08-01T07:54:09Z")

</div>

`display()` should be the right way of doing this (assuming you want two separate plots, one plotted after the other)

I see the same issue with the linter for `plot()` calls - @pfitzseb is there something in the method signatures of `plot` that confuses the linter here?

---

<div class="post-metadata">

### Author: ![yenson-lau](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yenson-lau/32/27690_2.png) [@yenson-lau](https://discourse.julialang.org/u/yenson-lau)
#### Post date: [August 2, 2021, 11:39pm UTC](https://discourse.julialang.org/t/problems-with-plotting-in-vscode/65616/5 "2021-08-02T23:39:45Z")

</div>

Thanks @JaderAzevedo that solved the display problem. Just waiting to hear if anyone knows about the linting issue. Surprised that this isn’t more common considering VSCode is the official editor for Julia now.
