0

I don't really like working in Jupyter enviroment and prefer raw Python. Is it posible to plot graphs directly in VSC via .py file? If I put my code to Jupyter cell in Jupyter file (.ipynp) the visualization works fine directly in VSC.

I use plotly or matplotlib, but i am willing to learn other packages if needed.

Is there for example some extencion to VSC that I could use? Or is it posible to plot to jpg/html file that I could open with file explorer?

Edit: I made a newbie mistake. I didn't use command plt.show() to plot the matplotlib graph. But GNU plotter suggested by Charudatta is also great solution

herdek550
  • 625
  • 1
  • 5
  • 10
  • 1
    This has already been answered [here](https://stackoverflow.com/questions/66121948/matplotlib-plots-not-showing-in-vs-code). I hope this solves your issue. – Cairoknox Oct 07 '22 at 12:44
  • have you tried Python Interactive `#%%`, or just launch your python file from the terminal, select a different backend and matplotlib uses a separate graph window – rioV8 Oct 07 '22 at 12:44

2 Answers2

1

try GNU plotter works great for plotting

Charudatta
  • 48
  • 1
  • 7
  • https://github.com/Charudatta999/helpfull/blob/main/gnu_plotter.sh you try this I have written a shell program which you could run through wsl – Charudatta Oct 10 '22 at 11:10
-1

I don't think you can, you can't display images in a terminal

iven
  • 9
  • 4