|
From: Jonathan T. <jt...@as...> - 2015-02-09 06:00:14
|
Hi,
On Sun, Feb 08, 2015 at 07:37:15PM -0800, Philipp K. Janert wrote:
> It used to be possible to pipe commands to gnuplot:
>
> cat script.gp | gnuplot
>
> When I try this with gp5, gnuplot seems to ignore
> the input.
>
> I did not see any comment on this in the documentation
> either way. What behavior should I expect?
Piping commands to gnuplot works fine for me with gnuplot 5.0.0
running on OpenBSD 5.6. In fact, I often do this for visualization:
I've written a Tk/Perl program 'slider' which provides a GUI to walk
through a data set, and outputs gnuplot commands for visualization;
I use it via shell scripts like this one:
#!/bin/sh
slider --min 401.022164175591 \
--delta 1.00255541043898 \
--max 501.277705219488 \
--continuous \
--command-file ../Phi.rl1-4.3D-slider-gnuplot-template \
| gnuplot
For a standalone test:
% uname -a
OpenBSD copper.astro.indiana.edu 5.6 GENERIC.MP#0 amd64
% echo 'show version long' | gnuplot
G N U P L O T
Version 5.0 patchlevel 0 last modified 2015-01-01
Copyright (C) 1986-1993, 1998, 2004, 2007-2015
Thomas Williams, Colin Kelley and many others
gnuplot home: http://www.gnuplot.info
faq, bugs, etc: type "help FAQ"
immediate help: type "help" (plot window: hit 'h')
Compile options:
-READLINE +LIBREADLINE -HISTORY
-BACKWARDS_COMPATIBILITY +BINARY_DATA
+GD_PNG +GD_JPEG +GD_TTF +GD_GIF +ANIMATION
-USE_CWDRC +X11 +X11_POLYGON +MULTIBYTE +X11_EXTERNAL +USE_MOUSE +HIDDEN3D_QUADTREE
+DATASTRINGS +HISTOGRAMS +OBJECTS +STRINGVARS +MACROS +THIN_SPLINES +IMAGE +USER_LINETYPES +STATS +EXTERNAL_FUNCTIONS
GNUPLOT_DRIVER_DIR = "/usr/local/libexec/gnuplot/5.0"
GNUPLOT_PS_DIR = "/usr/local/share/gnuplot/5.0/PostScript"
HELPFILE = "/usr/local/share/gnuplot/5.0/gnuplot.gih"
% echo 'set term x11 persist; plot sin(x)' | gnuplot
%
That last command produced an X window with the plot.
What gnuplot version are you using, and on what system?
ciao,
--
-- "Jonathan Thornburg [remove -animal to reply]" <jt...@as...>
Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA
"There was of course no way of knowing whether you were being watched
at any given moment. How often, or on what system, the Thought Police
plugged in on any individual wire was guesswork. It was even conceivable
that they watched everybody all the time." -- George Orwell, "1984"
|