Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Preview your gnuplot figures in VS Code

1,976 views
Skip to first unread message

fizzybreezy

unread,
Mar 9, 2020, 2:10:21 AM3/9/20
to
Hello,

I developed a VS Code extension to preview gnuplot figures when editing it and I want to share it with you to boost your work.

Here is the link : https://marketplace.visualstudio.com/items?itemName=fizzybreezy.gnuplot

And here is the source code : https://github.com/fizzybreezy/vscode-gnuplot

To active preview, just use command `gnuplot.view` or hotkey `ctrl(cmd) + alt +v` when editing gnuplot scripts ( *.gnuplot, *.gnu, *.plot, *.plt, *.gp ).The preview panel will auto refresh when you change your script and switch editor windows between scripts.

Enjoy this extension and welcome to help me improve it by post issues and pull request.

fizzybreezy

Cristian Camilo Mejia

unread,
Mar 9, 2020, 10:41:41 PM3/9/20
to
Hi man!
This sounds great for me. But, to be honest, I do not have idea of VS Code. I have installed VS Code on mac then I have installed the extension. However, still I can’t realize what do you mean with "Make sure you have added the directory containing gnuplot binary to PATH environment variable and restart VS Code before using this extension.” How can I do that...? There exist an ini file for VS Code? Where is it?
Thanks in advance,
Crist.

hiii...@gmail.com

unread,
Mar 11, 2020, 6:55:34 AM3/11/20
to
在 2020年3月10日星期二 UTC+8上午10:41:41,Cristian Camilo Mejia写道:
hi crist,

well, I didn't test this extension on mac and I am not familiar with mac. I'll try to give some advice.

1. just open a gnuplot script in VS Code and open the preview panel by pressing `cmd + alt +v` ,change and save your script(do not `set terminal` and `set output`),see if the extension is worked.

2. if not, reinstall gnuplot with brew and restart vscode(maybe also your computer). here is tutorial, https://gist.github.com/scuxiayiqian/c8ea9452f86dc1918de92b136e772c80.

Hopefully this will work for you, if you still have troubles, fell free to ask me and i'll try to help.

fizzy

Cristian Camilo Mejia

unread,
Mar 11, 2020, 10:34:38 AM3/11/20
to
Hi fizzy! It works!. It seems that my problem came from gnuplot/vscode: “Cannot find or open file”. In the script I have a line with set loadpath '../‘, which works well directly in gnuplot.

Thank you so much for your reply.
Best,
Crist.

hiii...@gmail.com

unread,
Mar 12, 2020, 4:25:20 AM3/12/20
to
在 2020年3月11日星期三 UTC+8下午10:34:38,Cristian Camilo Mejia写道:
hi crist,

I have published a patched version and now you can use lines like `loadpath '../'` .

cheers,
fizzy

Cristian Camilo Mejia

unread,
Mar 12, 2020, 10:20:25 AM3/12/20
to
Dear fizzy,
Great! I will try it soon.
Thanks a lot,
Crist.

Nope Nope

unread,
Aug 16, 2021, 6:42:02 AM8/16/21
to
Hi. Sorry for the inconvenience to responding to everyone but i couldn't contact/reply other than this: I have downloaded the preview extension for gnuplot code but when i try to run the preview command it fails and says "Gnuplot: Gnuplot: Preview Figure" and "command 'gnuplot.view' failed" i have set PATH to the gnuplot bin folder. Do you have any idea what could be done to fix this?

not you

unread,
Dec 25, 2022, 3:55:29 AM12/25/22
to
Where do I use the gnuplot.view? I tried the terminal but it didn't work.

Abhishek Ranna

unread,
Jun 15, 2023, 3:58:45 PM6/15/23
to
The following error shows up Check chanel output/gnulplot and the interface looks weird, can you help ?
0 new messages