* appendwrite: accumulate several runs into ONE raw file.
* Sweep R1 by hand with alter; each run appends a transient plot.
V1 in 0 SIN(0 1 1k)
R1 in out 1k
C1 out 0 100n
.tran 20u 1m
.control
  let rk = 1k
  while rk le 3k
    alter r1 rk
    run
    write sweep.raw v(out)
    set appendwrite      $ from the 2nd run on, append instead of overwrite
    let rk = rk + 1k
  end
  destroy all            $ clear the in-memory run plots first
  load sweep.raw         $ ...so echo shows only what the file holds
  echo $plots
.endc
.end
