need to fix this dang script.  Definition of plotting function is somehow not found.