Interactive Gadfly plots in vscode plot pane

I am testing the beautiful plotting package Gadfly for my workflow, and I am missing interactivity in the VS Code plot pane.

Is there way how to get it?

That should be fixed by Gadfly.jl#1373 (unless there is some new problem occurring). Are you using Gadfly v1.3+?

I am using Gadfly v1.3.2 with julia 1.6


using Gadfly

plot(z=(x,y) -> x*exp(-(x-round(Int, x))^2-y^2), xmin=[-10], xmax=[10], ymin=[-2], ymax=[2], Geom.contour)

I also see a static Gadfly plot on Gadfly 1.3.3 and Julia 1.6.0.

Hi, try running this

function, m::MIME"juliavscode/html", p::Gadfly.Plot)
    show(io, "text/html", p)

It fixes this problem for me! It looks like it’s caused by VSCode dropping support for displaying MIME"text/html". I will try to open a pull request to fix this.

1 Like