# \[VSCode\] Plot pane is not working for PGFPlotsX

**URL:** https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171
**Category:** Tooling
**Tags:** vscode, pgfplotsx
**Created:** [September 14, 2021, 8:50pm UTC](https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171 "2021-09-14T20:50:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![SingingKim](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@SingingKim](https://discourse.julialang.org/u/SingingKim)
#### Post date: [September 14, 2021, 8:50pm UTC](https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171/1 "2021-09-14T20:50:47Z")

</div>

Hi everyone, I’m trying to plot some graphs on the plot pane on VSCode.  
I have toggled on the Use Plot Pane option as below:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/6/2/6235b840e0a37025b40fed439f17b7a6097cd7aa.png)

Unfortunately, everytime I type `td` or `display(td)` in the Julia REPL after the following code, it opens a pdf reader (preview) and display the figure on it instead of the plot pane. Can anyone help me fix this?

Here is the MWE:

```julia
using PGFPlotsX

push!(PGFPlotsX.CUSTOM_PREAMBLE,
    raw" \usepackage{bm}")

td = TikzDocument(raw"""
\begin{tikzpicture}
    \begin{axis}[
        xlabel=$\bm{x}$,
        ylabel=$y$
    ]
    \addplot[smooth, mark=*, blue]
    table[row sep={\\}]
    {
        0 2 \\
        2 3 \\
        3 1 \\
    };
    \addlegendentry{Case 1}

    \end {axis}
\end{tikzpicture}
""")

```

And here’s my environment:

```julia
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

```

```julia
(@v1.6) pkg> status
      Status `~/.julia/environments/v1.6/Project.toml`
  [7c4d4715] AmplNLWriter v0.7.2
  [c52e3926] Atom v0.12.34
  [aaaa29a8] Clustering v0.14.2
  [5ae59095] Colors v0.12.8
  [a93c6f00] DataFrames v1.2.2
  [31c24e10] Distributions v0.25.16
  [191a621a] Dualization v0.3.4
  [2e9cd046] Gurobi v0.9.14
  [7073ff75] IJulia v1.23.2
  [b6b21f68] Ipopt v0.7.0
  [4076af6c] JuMP v0.21.10
  [e5e0dc1b] Juno v0.8.4
  [67920dd8] KNITRO v0.10.0
  [b964fa9f] LaTeXStrings v1.2.1
  [23992714] MAT v0.10.1
  [6405355b] Mosek v1.1.3
  [1ec41992] MosekTools v0.9.4
  [f10290a3] NEOSServer v0.4.0
  [a8b11937] OpenDSSDirect v0.7.2
  [8314cec4] PGFPlotsX v1.4.0
  [91a5bcdd] Plots v1.21.3
  [c36e90e8] PowerModels v0.18.2
  [6e471128] PowerModelsAnnex v0.7.1
  [c946c3f1] SCS v0.7.1
  [29cba6d7] Bonmin_jll v100.800.800+0
  [8ba89e20] Distributed

```

---

<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: [September 15, 2021, 8:58am UTC](https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171/2 "2021-09-15T08:58:08Z")

</div>

I can’t reproduce this issue on version 1.4.0 of the extension.

---

<div class="post-metadata">

### Author: ![SingingKim](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@SingingKim](https://discourse.julialang.org/u/SingingKim)
#### Post date: [November 2, 2021, 7:43pm UTC](https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171/3 "2021-11-02T19:43:40Z")

</div>

@pfitzseb Thank you for the reply. I tried this with three different macs, and they were all the same. Please see this:

Your browser does not support the video tag.

---

<div class="post-metadata">

### Author: ![SingingKim](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@SingingKim](https://discourse.julialang.org/u/SingingKim)
#### Post date: [December 6, 2021, 5:13pm UTC](https://discourse.julialang.org/t/vscode-plot-pane-is-not-working-for-pgfplotsx/68171/4 "2021-12-06T17:13:32Z")

</div>

Dear @pfitzseb and other users,

Could anyone take a look at this and tell me if it is just my macs?

Thank you!
