Re: array (ab)use case

Norwid Behrnd via gnuplot-info <[email protected]> Mon, 11 Jul 2022 10:40:04 +0200
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <20220711104004.542ab09c@carnot2>
Jeremy Nicoll wrote:

> If someone tries to read through your older posts following the
> successive changes you made to your code, they cannot see all
> the different pictures that you made, because each newer one
> overwrote the older ones.

@Jeremy
My interpretation of you reply is you recommend snippets of code
shared here should be both complete as in «all the relevant
instructions to demonstrate the issue» .and. self sufficient for a
test run, i.e. to include a minimal set of data to process.  In other
words, to include gnuplot's datablocks (`$data`) as in e.g.,

```gnuplot script
$data << EOD
1 2
2 4.5
3 3
4 -1.2
5 0
EOD

set terminal pngcairo
set output "test.png"
set grid
plot "$data" w lp pt 2 lc "blue" title "par example"
```

or, considering only a dozen of records of Emanuel's log

```gnuplot script
$data << EOD
11814601 737184 610310 13198 4223 1885
11830440 737790 611265 13295 4239 1904
11846530 739535 612274 13396 4264 1918
11861902 742324 613332 13513 4285 1931
11877902 743061 614346 13551 4301 1992
11894437 744473 615366 13609 4318 2290
11910270 745453 616369 13731 9014 4356
11925807 745957 617127 13840 9725 4372
11941696 746489 617887 13952 10055 4387
11958357 748936 618940 14061 10281 4425
11975490 749952 619995 14129 10342 4440
EOD

set term png background rgb "black"
set out "check.png"

set tics font "verdana,10"

set format x "%s" timedate
set xtics 3,7
set xrange [1:] noextend

set format y "%.0s%c"
set logscale y
set yrange[1000:1e9]

set grid   lc "yellow"
set border lc "gray"

set key outside top right spacing 1.4 tc "white" font "verdana,10"
horizontal

array Cols = ["cyan", "magenta", "yellow", "green", "white", "red"]

data= "$data"
plot for [i=1:*] \
 data u ($0+1):i w l lc rgb Cols[(i % 6) + 1] lw 2 t columnhead
```

@moderators of the mailing list
Perhaps the suggest to include small datablocks to render MWE easier
to replicate could be included in one of the mails when subscribing to
the list.


_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info