plot loss functions