plots losses