Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2937
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2015-06-17 18:00 -0700 |
| Message-ID | <f1dbf443-8220-4a41-bb98-a03c6c71acea@googlegroups.com> (permalink) |
| Subject | Passing a GNUplot variable to system(/usr/bin/awk) |
| From | "Dan'l B" <dan.hinckley@gmail.com> |
This line in GNUplot works fine:
system("/usr/bin/awk '/-1.98/{print $2 $1}' /path/to/myfile.txt")
But how would I pass a variable from GNUplot into that in place of the -1.98 value?
For example, using STATS_max_y from a plot command:
system("/usr/bin/awk '/STATS_max_y/{print $2 $1}' /path/to/myfile.txt")
That (and its variants) don't work, and I can't work out the formatting to do this correctly.
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar | Unroll thread
Passing a GNUplot variable to system(/usr/bin/awk) "Dan'l B" <dan.hinckley@gmail.com> - 2015-06-17 18:00 -0700
Re: Passing a GNUplot variable to system(/usr/bin/awk) Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2015-06-20 01:43 +0200
Re: Passing a GNUplot variable to system(/usr/bin/awk) "Dan'l B" <dan.hinckley@gmail.com> - 2015-06-20 07:58 -0700
csiph-web