Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #2906

Re: extracting data from .gnu file

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From Hans-Bernhard Bröker <HBBroeker@t-online.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: extracting data from .gnu file
Date Thu, 14 May 2015 00:29:37 +0200
Lines 31
Message-ID <cri1iiFkqprU1@mid.dfncis.de> (permalink)
References <d70469ab-ccd5-4f79-9ff2-24dae78036a1@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.dfncis.de PalcDqaXaiWUNlZjGAwIpgHluM95wuJfb38KuqXMSmFmyaAY1zzKVWgwK+
Cancel-Lock sha1:eMiVzlq0e35UWifIIjPJZ6fX5wE=
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
In-Reply-To <d70469ab-ccd5-4f79-9ff2-24dae78036a1@googlegroups.com>
Xref csiph.com comp.graphics.apps.gnuplot:2906

Show key headers only | View raw


Am 11.05.2015 um 00:20 schrieb foice:
> Hello I know very little on gnuplot and I am wondering how much data manipulation can be done, besides plotting.

Some can be done, but it's not exactly the primary job of a plotting 
program.

In your particular example things are complicated further by your 
"somebody" giving you a combined gnuplot script and gnuplot data file 
(so-called "inline data", see "help datafile special" in gnuplot).

 >    plot "-" with histeps
 >       4.50000        3986.18        1.27863
 >       5.50000        3986.18        1.27863
 >       6.50000        3986.18        1.27863
 >   e

As-is, this script can only be run through gnuplot to produce diagrams, 
but that's about it.  gnuplot keeps no memory of such datasets longer 
than it takes to produce the plot itself.

> I would like to extract all the data from this file to combine, for
> instance, the m(5) histogram that I have in several files (combine means
> do a weighted average, in case it matters).

You'll have to do that with tools outside gnuplot. For single-shot work, 
a text editor should suffice.  If this is to be done again on a regular 
basis, however, you'll want to write a script in the scripting language 
of your choice to find the data sections of those gnuplot scripts and 
save them to files of some cleverly chosen names.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

extracting data from .gnu file foice <franceschini.roberto@gmail.com> - 2015-05-10 15:20 -0700
  Re: extracting data from .gnu file Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2015-05-14 00:29 +0200

csiph-web