Re: Compute values with 'every'
Alexander Stangl <[email protected]>
| Newsgroups | gmane.comp.graphics.gnuplot.user |
|---|---|
| Message-ID | <CAEEUwSMCHMwA0zX0Btc5jVxVdmpH73ArXb5KDJjBswBC0RGvTg@mail.gmail.com> |
Hey,
what about:
y=NaN
plot file1 every 4::0 using 1 title "25" ls 1, \
file1 every 4::1 using 1 title "50" ls 3, \
file1 every 4::2 using 1 title "75" ls 5, \
file1 every 4::3 using 1 title "100" ls 7, \
file1 u 0:(int($0)%4==0 ? y=$1 : int($0)%4==2 ? $1*y : NaN) t
"50*100"
Best,
Alex
On Tue, 1 Dec 2020 at 15:18, Robert von Knobloch <[email protected]> wrote:
> Hi,
> I am plotting groups of 4 lines of data.
> I can plot the first datum of each line using:
>
> plot file1 every 4::0 using 1 title "25" ls 1, \
> file1 every 4::1 using 1 title "50" ls 3, \
> file1 every 4::2 using 1 title "75" ls 5, \
> file1 every 4::3 using 1 title "100" ls 7
>
> Which works fine for the whole file of 50 or so entries
>
> What I would like to be able to do is to add a computed line e.g. the
> result of datum#1 in the first of the 4 block multiplied by datum#1 of
> the third block (for the whole file).
>
> Is there a method of doing this?
>
> Regards,
> Robert von Knobloch
>
>
> _______________________________________________
> gnuplot-info mailing list
> [email protected]
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info