|
From: Alexander S. <ma...@st...> - 2020-12-02 14:23:04
|
"set datafile missing NaN" should do the trick and here's a small edit: (int($0)%4 == 0 ? (y=$1,NaN) : int($0)%4 == 3 ? y/$1 : NaN) else it would plot datum#1 every 4th line (starting first line) and datum#1/datum#3 every 4th line (starting from the third line). Cheers, Alex On Wed, 2 Dec 2020 at 14:21, Robert von Knobloch <bo...@en...> wrote: > On 01/12/2020 16:29, Alexander Stangl wrote: > > 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 > > > > Hi Alex, thanks for the code. > It did not produce a visible plot for me, so I adjusted it a wee bit: > > y=NaN > plot file1 every 4::0 using 1 title "rr25" ls 1, \ > file1 every 4::1 using 1 title "rr50" ls 3, \ > file1 every 4::2 using 1 title "rr75" ls 5, \ > file1 every 4::3 using 1 title "rr100" ls 7, \ > file1 using 0:(int($0)%4 == 0 ? y=$1 : int($0)%4 == 3 ? y/$1 : > NaN) > title "rr100/rr50" ls 9 > > I'm dividing, not multiplying but the result is the same: > > small pieces of plot trace between each 3rd and 0th (4th) entry the > endpoints of these pieces don't seem to bear any numerical relationship > to the data. > Small picture attached, also to your direct mail as I think the list may > not support pictures. > > I think I see the logic of your suggestion and cannot see any reason why > it should not work (from reading the Gnuplot docs). > > Many thanks for your time, > > Bob > |