node-gnuplot
A super-thin wrapper around gnuplot for node.js
example
var gnuplot = ;;
You can use streams!
var data = fsout = fsplotter = ;data;
methods
var gnuplot =
gnuplot()
Spawn a new gnuplot process and return a duplex stream combining stdout
and stdin
.
gnuplot.print(data, options={})
Write data to stdin of the gnuplot process. If the stream should be closed after the write, pass {end: true}
as options.
gnuplot.println(data, options={})
Same as gnuplot.print(data + '\n', options)
gnuplot.set(data, options={})
Same as gnuplot.println('set ' + data, options)
gnuplot.unset(data, options={})
Same as gnuplot.println('unset ' + data, options)
gnuplot.plot(data, options={})
Same as gnuplot.println('plot ' + data, options)
gnuplot.splot(data, options={})
Same as gnuplot.println('splot ' + data, options)
gnuplot.replot(data='', options={})
Same as gnuplot.println('replot ' + data, options)
All of the above functions returns the gnuplot object and can be chained together:
;
To automatically call end() on the input stream after a command, pass {end: true}
as options:
;
install
With npm do:
npm install gnuplot
You need to have gnuplot installed. On OSX you can do this with homebrew:
brew install gnuplot
license
ISC