|
From: Philipp K. J. <ja...@ie...> - 2015-02-09 06:07:50
|
No, it doesn't work for me.
Here is the contents of my test script:
set t pngcairo
plot sin(x)
I invoke it like this:
cat script.gp | gnuplot > graph.png
When I use gnuplot 4.6 patchlevel 3 (which comes
with my distro), all is well. But when I use version
5, nothing happens - I simply get dropped into an
interactive session.
Mind you, batch processing works with version 5:
gnuplot5 script.gp > graph.png
is fine.
Here are the specifics:
Linux puget 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
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')
On Mon, 9 Feb 2015 00:26:20 -0500
Jonathan Thornburg <jt...@as...> wrote:
> 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,
>
|