Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #4028
| X-Received | by 2002:a24:419d:: with SMTP id b29-v6mr2413684itd.48.1533260153395; Thu, 02 Aug 2018 18:35:53 -0700 (PDT) |
|---|---|
| X-Received | by 2002:aca:c6ca:: with SMTP id w193-v6mr170289oif.1.1533260153056; Thu, 02 Aug 2018 18:35:53 -0700 (PDT) |
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!g24-v6no1398500iti.0!news-out.google.com!k71-v6ni1262itk.0!nntp.google.com!g24-v6no1398498iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.graphics.apps.gnuplot |
| Date | Thu, 2 Aug 2018 18:35:52 -0700 (PDT) |
| In-Reply-To | <pjvcdk$r4h$1@dont-email.me> |
| 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 |
| References | <7f451633-8c55-48bc-92ad-ac5351eaff07@googlegroups.com> <pjvcdk$r4h$1@dont-email.me> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <f60d1d36-0bfc-4432-829e-6b1c54878db2@googlegroups.com> (permalink) |
| Subject | Re: Set plot title from datafile? |
| From | rowlesmr@gmail.com |
| Injection-Date | Fri, 03 Aug 2018 01:35:53 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 47 |
| Xref | csiph.com comp.graphics.apps.gnuplot:4028 |
Show key headers only | View raw
On Friday, 3 August 2018 00:44:38 UTC+8, Ethan Merritt wrote:
> On Thu, 02 Aug 2018 08:02:12 -0700, rowlesmr wrote:
>
> > How can I set the title of my plot from a string in my data file?
> >
> > My data is like so:
>
> [snip]
>
> >
> > 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
>
>
> It is not possible in 5.2
>
> In the development version (5.3) you could do it in two steps,
> which might or might not be OK in your application case:
>
> do for [i=4:8] {
> unset title
> plot 'data.txt' index j u 2:i w lp title (FOO=columhead(i))
> set title FOO
> replot
> }
>
> Ethan
Thanks Ethan
Is it possible to set the title as a particular columnhead? eg the third one? I could do some preprocessing to put the string I want into that position.
Matthew
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | 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