Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4026
| X-Received | by 2002:a02:b705:: with SMTP id g5-v6mr1411169jam.10.1533222133322; Thu, 02 Aug 2018 08:02:13 -0700 (PDT) |
|---|---|
| X-Received | by 2002:aca:75c9:: with SMTP id q192-v6mr122340oic.3.1533222133080; Thu, 02 Aug 2018 08:02:13 -0700 (PDT) |
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g24-v6no910261iti.0!news-out.google.com!k71-v6ni845itk.0!nntp.google.com!g24-v6no910257iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.graphics.apps.gnuplot |
| Date | Thu, 2 Aug 2018 08:02:12 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=58.178.221.193; posting-account=t7HSDAoAAADl3mmKT_nPfhxWxoL5AyFC |
| NNTP-Posting-Host | 58.178.221.193 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <7f451633-8c55-48bc-92ad-ac5351eaff07@googlegroups.com> (permalink) |
| Subject | Set plot title from datafile? |
| From | rowlesmr@gmail.com |
| Injection-Date | Thu, 02 Aug 2018 15:02:13 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 42 |
| Xref | csiph.com comp.graphics.apps.gnuplot:4026 |
Show key headers only | View raw
How can I set the title of my plot from a string in my data file?
My data is like so:
>filename seqno phasename a b c scale Rwp
>blah_001.xye 1 corundum 3 3 12 0.001 3
>blah_002.xye 2 corundum 3.1 3.1 12.1 0.002 3.5
>blah_003.xye 3 corundum 3.2 3.2 12.2 0.001 3.1
>blah_004.xye 4 corundum 3.4 3.4 12.2 0.001 3.2
>blah_005.xye 5 corundum 3.5 3.5 12.3 0.001 3.9
>blah_006.xye 6 corundum 3.6 3.6 12.3 0.001 3.1
>
>
>filename seqno phasename a b c scale Rwp
>blah_001.xye 1 silcon_NIST 5.4 5.4 5.4 0.002 3
>blah_002.xye 2 silcon_NIST 5.41 5.41 5.41 0.004 3.5
>blah_003.xye 3 silcon_NIST 5.42 5.42 5.42 0.002 3.1
>blah_004.xye 4 silcon_NIST 5.43 5.43 5.43 0.002 3.2
>blah_005.xye 5 silcon_NIST 5.44 5.44 5.44 0.002 3.9
>blah_006.xye 6 silcon_NIST 5.45 5.45 5.45 0.002 3.1
and I'm plotting it with a nested for loop like so:
>set key autotitle columnhead
>do for [j=0:1] {
> do for [i=4:8] {
> plot 'data.txt' index j u 2:i w lp t columnhead
> }
>}
I am successfully setting the key from the header information. I would like the title for each graph to be taken from the text string in the 3rd column (ie corundum or silcon_NIST). I know that this would give many graphs with the same title.
Is this possible? If so, how can I do it?
I am using gnuplot 5.2 patchlevel 2 in Cygwin
Thanks
Matthew
Back to comp.graphics.apps.gnuplot | Previous | Next — Next in thread | Find similar
Set plot title from datafile? rowlesmr@gmail.com - 2018-08-02 08:02 -0700
Re: Set plot title from datafile? Ethan Merritt <eamerritt@gmail.com> - 2018-08-02 16:44 +0000
Re: Set plot title from datafile? rowlesmr@gmail.com - 2018-08-02 18:35 -0700
Re: Set plot title from datafile? Ethan Merritt <eamerritt@gmail.com> - 2018-08-03 16:24 +0000
csiph-web