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:24) {
    mfrow <- c(4, 6)
  } else {
    mfrow <- rep(ceiling(sqrt(num_recipe)), 2)
  }
  return(mfrow)
}

