added handling of negative values in log plots