|
From: theozh <th...@gm...> - 2017-10-28 08:24:05
|
Thanks a lot Ethan,
I'll never would have found this one.
With the minor change "ysum-$2/2", the following seems to place the
number in the center of the portion.
plot $Data u 2 ti col , '' u 3:key(1) ti col, \
ysum=0 '' skip 1 using (0):((ysum = ysum + $2, ysum-$2/2)):2 with
labels notitle, \
ysum=0 '' skip 1 using (1):((ysum = ysum + $3, ysum-$3/2)):3 with
labels notitle
However, if looking at the syntax in "help plot"
plot-element:
{<iteration>}
<definition> | {sampling-range} <function> | <data source>
{axes <axes>} {<title-spec>}
{with <style>}
I still don't understand why and how ((ysum = ysum + $2, ysum-$2/2))
works. So apparently, you can place an expression/function before the
comma and the expression after the comma is actually plotted? Good to
know, I didn't know that one can make such constructs. Would be nice to
have an example in "plot help" or if you have a link where to find this
documented, please let me know.
|