jmbm

Fig_01

Oct 10th, 2022 (edited)
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.42 KB | None | 0 0
  1. pdf("fig_01.pdf", width = 5, height = 5)
  2. par(bty = "n", las = 1, mar = c(3, 4, 4, 1) + 0.2)
  3. #---- Reparto sin ordenar
  4. n <- 100 # número de tiras
  5. izq <- runif(n)
  6. dch <- 1 - izq
  7. monton_izq <- sum(izq)
  8. monton_dch <- sum(dch)
  9. barplot(c(monton_izq, monton_dch),
  10.         names.arg = c("izquierda", "derecha"),
  11.         col = c("darkorange", "lightblue"),
  12.         ylab = "tamaño del montón", main = "SIN ORDENAR")
  13. dev.off()
Advertisement
Add Comment
Please, Sign In to add comment