gnuplot.nim icon indicating copy to clipboard operation
gnuplot.nim copied to clipboard

Interface with `gnuplot` via a pipe

Open nuxeh opened this issue 7 years ago • 2 comments

Hello, you can send data to gnuplot without using a temporary file, on unix-like OSes at least, by using popen to spawn gnuplot and write data and commands to it via a pipe, similar to what's mentioned at the bottom of this stack overflow answer:

https://stackoverflow.com/a/6934363/2977344https://stackoverflow.com/a/6934363/2977344

I've done this with some success from C code, and it's pretty tidy. Would you be interested in adding such functionality?

nuxeh avatar Dec 18 '18 15:12 nuxeh

Sorry for not getting to this; I don't mind leaving the files around, so I'm not going to work on this, but if you want to then sure.

dvolk avatar Nov 11 '20 02:11 dvolk

You can send data to gnuplot without using additional pipes.

cmd "$data << EOD" cmd "0 0 A" cmd "0 1 B" cmd "1 1 C" cmd "1 2 D" cmd "2 2 E" cmd "EOD" cmd "plot $data with labels boxed"

nomissbowling avatar Nov 29 '22 02:11 nomissbowling