Displaying plots in VegaLite opens vscode

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:

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


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

Thanks in advance for your help

What operating system are you on?

Ubuntu 18.04

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: https://itsfoss.com/change-default-applications-ubuntu.

1 Like

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?

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

1 Like