# Displaying plots in VegaLite opens vscode

**URL:** <https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336>\
**Category:** Visualization\
**Created:** [December 5, 2018, 5:03pm UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336 "2018-12-05T17:03:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Vahdati](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_vahdati/32/38715_2.png) [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Post date:** [December 5, 2018, 5:03pm UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/1 "2018-12-05T17:03:28Z")

</div>

I have no idea what configuration is wrong, but when I try to display a simple plot from VegaLite, a new instance of vscode opens.

It happens when I do:

```julia
using VegaLite, VegaDatasets
data = dataset("cars")
data |> @vlplot(:point, x=:Miles_per_Gallon, y=:Horsepower, column=:Origin, color=:Cylinders)

```

or

```julia
p = data |> @vlplot(:point, x=:Miles_per_Gallon, y=:Horsepower, column=:Origin, color=:Cylinders);
display(p)

```

Thanks in advance for your help

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [December 5, 2018, 10:54pm UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/2 "2018-12-05T22:54:02Z")

</div>

What operating system are you on?

---

<div class="post-metadata">

**Author:** ![Ali\_Vahdati](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_vahdati/32/38715_2.png) [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Post date:** [December 6, 2018, 2:03am UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/3 "2018-12-06T02:03:21Z")

</div>

Ubuntu 18.04

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [December 6, 2018, 8:46am UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/4 "2018-12-06T08:46:25Z")

</div>

This probably means that you have your mime-type default application set wrong. You need to find out what output is produced by vegas, probably svg or png. And then check that the right program opens it, maybe start here: [How to Change Default Applications in Ubuntu - It's FOSS](https://itsfoss.com/change-default-applications-ubuntu).

---

<div class="post-metadata">

**Author:** ![Ali\_Vahdati](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_vahdati/32/38715_2.png) [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Post date:** [December 6, 2018, 1:30pm UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/5 "2018-12-06T13:30:10Z")

</div>

I tested the format that VegaLite opens on my Windows machine. It is SVG. I can confirm that “Image Viewer” opens SVG on my Ubuntu machine. When I save a plot in SVG format, I can double click on it and it opens in Image viewer. So it seems the default application is set correctly on Ubuntu.

Could it be that there is a default application for SVG files on REPL?

---

<div class="post-metadata">

**Author:** ![Ali\_Vahdati](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ali_vahdati/32/38715_2.png) [@Ali\_Vahdati](https://discourse.julialang.org/u/Ali_Vahdati)\
**Post date:** [December 6, 2018, 2:57pm UTC](https://discourse.julialang.org/t/displaying-plots-in-vegalite-opens-vscode/18336/6 "2018-12-06T14:57:50Z")

</div>

The problem was the default application to open .html files. It is solved now. Thanks for your insight.
