cost graph