# Issue with plots in vscode

**URL:** <https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158>\
**Category:** New to Julia\
**Tags:** vscode, plots\
**Created:** [November 8, 2021, 4:02pm UTC](https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158 "2021-11-08T16:02:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bww00](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@bww00](https://discourse.julialang.org/u/bww00)\
**Post date:** [November 8, 2021, 4:02pm UTC](https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158/1 "2021-11-08T16:02:11Z")

</div>

in a command window the following produces a plot (2 messages).  
Run in vscode doesnt produc a plot.

julia\> using Plots

(process:23960): GLib-GIO-WARNING \*\*: 09:56:57.906: Unexpectedly, UWP app `Microsoft.Office.OneNote_16001.12026.20112.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.Office.OneNote\_8wekyb3d8bbwe!microsoft.onenoteim’) supports 2 extensions but has no verbs

(process:23960): GLib-GIO-WARNING \*\*: 09:56:57.928: Unexpectedly, UWP app `Microsoft.MicrosoftSolitaireCollection_4.4.8204.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.MicrosoftSolitaireCollection\_8wekyb3d8bbwe!App’) supports 1 extensions but has no verbs

julia\> #versioninfo()

julia\> x = 1:10; y = rand(10); # These are the plotting data

julia\> plot(x, y)

julia\> versioninfo()  
Julia Version 1.6.1  
Commit 6aaedecc44 (2021-04-23 05:59 UTC)  
Platform Info:  
OS: Windows (x86\_64-w64-mingw32)  
CPU: Intel(R) Core™ i7-8650U CPU @ 1.90GHz  
WORD\_SIZE: 64  
LIBM: libopenlibm  
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

julia\>

Thanks

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [November 8, 2021, 4:26pm UTC](https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158/2 "2021-11-08T16:26:17Z")

</div>

This came up before and I don’t think anything on our side is at fault here. [You could try reinstalling those apps](https://stackoverflow.com/questions/67607643/what-does-this-warning-mean-it-happens-every-time-i-restart-the-node-process).

---

<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:** [November 9, 2021, 8:31am UTC](https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158/3 "2021-11-09T08:31:28Z")

</div>

Your problem seems to be the: x  
Usual in Julia you don’t need the x-coordinate  
You can write:

```julia
using Plots
y=rand(10)
plot(y)

```

Or if you want/need the x-coordinate(like in Python)

```julia
using Plots
x=collect(1:10)
y=rand(10)
plot(x,y)

```

or complete Julia-like

```julia
plot(rand(10))
plot(collect(1:10), rand(10))

```

😉

---

<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:** [November 9, 2021, 8:50am UTC](https://discourse.julialang.org/t/issue-with-plots-in-vscode/71158/4 "2021-11-09T08:50:50Z")

</div>

No, there’s no problem with the `x` coordinates here. Just using a range `1:10` works just fine, and is recommended over `collect(1:10)` as `collect` unnecessarily allocates an array here.

You are right of course that `1:10` are the default x values for plotting a vector of length 10 anyways so it can be left out.
