#! /bin/bash -e
# Last edited on 2026-02-18 03:10:39 by stolfi

# Plots the reset choice {k] as a function of the text length {nT}.
# Input file must be pairs {nT,k}. There may be a newline
# or '!' betweem pairs, and space of ',' between the two numbers.

cat \
 | tr ',!' ' \012' \
 > .temp
 
gnuplot << EOF
  set term X11 noenhanced
  set xrange [-1:41]
  set yrange [-1:41]
  plot \
    (x) with lines lc rgb '#ff8866', \
    (0.667*x) with lines lc rgb '#ff8866', \
    ".temp" using 1:2 with point ps 2 pt 7 lc rgb '#008800'
  pause mouse
  quit
EOF
