decide_nice_layout <- function(num_recipe) {
 
  if (num_recipe == 1) {
    mfrow <- c(1, 1)
  } else if (num_recipe == 2) {
    mfrow <- c(2, 1)
  } else if (num_recipe %in% 3:4) {
    mfrow <- c(2, 2)
  } else if (num_recipe %in% 5:6) {
    mfrow <- c(3, 2)
  } else if (num_recipe %in% 11:12) {
    mfrow <- c(3, 4)
  } else if (num_recipe %in% 17:20) {
    mfrow <- c(4, 5)    
  } else if (num_recipe %in% 21:24) {
    mfrow <- c(4, 6)
  } else {
    mfrow <- rep(ceiling(sqrt(num_recipe)), 2)
  }
  return(mfrow)
}

