#!/bin/sh

./abundances_npa.awk < abundances_npa.dat | \
  awk '
!/^#/ && (NF>0){
   e = $2;
   x = $3;
   y = $5;

   tmp = "";

   if ((e == "H") || (e == "He") || (e == "Li")) {
     e = "{/Helvetica-Bold=24 " e "  }";
     tmp = " right";
     print "set label \"" e "\" at " x "," y "" tmp " front";
   } else if ((e == "Ar") || (e == "Kr")) {
     e = "  " e;
     print "set label \"" e "\" at " x "+x1," y "-y1" tmp " front";
   } else {
     e = "  " e;
     print "set label \"" e "\" at " x "+x1," y "+y1" tmp " front";
   }
}
  ' > abundances_npa.lab

FILE=slunce_meteority_abundances_npa
./$FILE.plt
patch $FILE.eps $FILE.eps.diff

