#! /bin/bash
# Last edited on 2025-01-28 21:48:29 by stolfi

# Reads two histogram files produced by "pgmhist -machine". 
# Plots them on the same graph.

histfile1="$1"; shift;
histfile2="$1"; shift;

export GDFONTPATH=ttf
export GNUPLOT_FONTPATH=ttf

gnuplot << EOF
  set term X11
  set xrange [-5:]
  plot \
    "${histfile2}" using 1:2 title "File 2" with histeps lc rgb "#008800", \
    "${histfile1}" using 1:2 title "File 1" with histeps lc rgb "#ff0000"
  pause mouse
EOF
