|
From: Ethan A M. <eam...@gm...> - 2014-01-23 05:59:19
|
On Thursday, 23 January 2014 01:07:39 AM Tait wrote:
> The '' syntax re-uses the file name, not the file data. With a normal
> file the '' actually re-reads the file again, which is why when gnuplot
> goes to re-read from inline you must re-supply the data. To reuse the
> file's data, gnuplot would obviously have to cache it, and that is
> impractical or impossible for large data sets.
>
> I think I recall some discussion along the lines of implementing a named
> data store feature that would explicitly instruct gnuplot to cache a
> particular (potentially inline) data set, but I'm not sure whether it
> was completed.
Correct.
In 4.7 you can provide named data blocks.
gnuplot> help inline
There are two mechanisms for embedding data into a stream of gnuplot commands.
If the special filename '-' appears in a plot command, then the lines
immediately following the plot command are interpreted as inline data.
See `special-filenames`. Data provided in this way can only be used once, by
the plot command it follows.
The second mechanism defines a named data block as a here-document. The named
data is persistent and may be referred to by more than one plot command.
Example:
$Mydata << EOD
11 22 33 first line of data
44 55 66 second line of data
# comments work just as in a data file
77 88 99
EOD
stats $Mydata using 1:3
plot $Mydata using 1:3 with points, $Mydata using 1:2 with impulses
Data block names must begin with a $ character, which distinguishes them from
other types of persistent variables. The end-of-data delimiter (EOD in the
example) may be any sequence of alphanumeric characters.
Ethan
>
> To only type in the data once, put it into a regular file with the
> appropriate format, and reference it by its file name.
>
> Theo <th...@gm...> said (on 2014/01/22):
> > Hi there,
> >
> > if I want to include (for some special reason) data into the plotting
> > file itself I can use the special filename '-' and write the data in the
> > plot file...
> >
> > Why can't I use the same data twice? Can anybody explain?
> > Is there a way that I have to type in the data only once?
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
|