lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Displaying lets_plot in vscode (no notebook)

Open Rafael-Silva-Oliveira opened this issue 2 years ago • 3 comments

I'm trying to run a lets_plot example in vscode (no notebook), but I can't seem to put it to display the plot within vscode as I can do with other libraries (where it opens on a new tab in vscode).

Any solution to this without using notebooks (or inline approaches such as # %%)?

Rafael-Silva-Oliveira avatar Oct 25 '23 10:10 Rafael-Silva-Oliveira

Please make sure

  • IPython is installed in your env
  • You invoke plot.show() method.

I'm not sure if VSCode does execute JS code we provide. Maybe not by default, maybe not at all. If so, try using "no JS" option:

LetsPlot.setup_html(no_js=True)

alshan avatar Oct 26 '23 16:10 alshan

Hi @Rafael-Silva-Oliveira , have you succeeded in getting lets-plot charts displayed in vscode?

alshan avatar Nov 30 '23 20:11 alshan

Hi @Rafael-Silva-Oliveira , In v4.3.0 we added setup_show_ext() which you can use instead of setup_html()to allow plots to be displayed in an external browser window.

alshan avatar Mar 29 '24 20:03 alshan