Do a little simulated annealing and gnuplotting.