Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3527
| From | Karl Ratzsch <mail.kfr@gmx.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: Using '' versus @dat and the use of volatile |
| Date | 2017-01-16 16:49 +0100 |
| Organization | solani.org |
| Message-ID | <o5iq2c$ba$1@solani.org> (permalink) |
| References | <587ce294$0$21471$e4fe514c@news.xs4all.nl> |
Am 16.01.2017 um 16:11 schrieb Alex van der Spek:
> Often I plot from large bzip2'ed files using a macro and input
> redirection. As per so:
>
> set macros
> #Macro
> dat = "sprintf('< bzcat %s', data)
>
> #Plot
> plot @dat using 1:2, \
> @dat using 1:3
(Why the macro? Works fine without.)
> Does this call bzcat twice? Would it be faster to use '' in the second
> line, i.e. this:
>
> #Plot
> plot @dat using 1:2, \
> '' using 1:3
Yes, bzcat is run twice, and no, it doesn't help. Because gnuplot only
reads what is specified on the "using" specifier each time, and only
uses it for that specific plot.
"volatile" data can just be replotted without rereading, but not used in
a new (sub)plot.
> Can I prevent the rereading and reexecution of bzcat in a subsequent plot
> command using the "volatile".
You can read in your datafile to memory like following (also see "help
inline data"):
set table $data
plot dat using 1:2:3 with table
unset table
plot $data using 1:2, $data using 1:3
(This is a gnuplot vers 5.0 feature.)
Note that this named data block $data simply stores text, not binary
data. Gnuplot still has to reprocess it every time, which means the
speed increase is not as great as could probably be expected. (?)
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar
Using '' versus @dat and the use of volatile Alex van der Spek <zdoor@xs4all.nl> - 2017-01-16 15:11 +0000 Re: Using '' versus @dat and the use of volatile Karl Ratzsch <mail.kfr@gmx.net> - 2017-01-16 16:49 +0100
csiph-web