Skip to content

Instantly share code, notes, and snippets.

@rinze
Created December 21, 2015 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rinze/2323a54b092de485ee9b to your computer and use it in GitHub Desktop.
Save rinze/2323a54b092de485ee9b to your computer and use it in GitHub Desktop.
Generador automático de líneas rojas para partidos políticos.
library(ggplot2)
NLINEAS <- 20
coords <- data.frame(x1 = runif(NLINEAS, 0, 10),
x2 = runif(NLINEAS, 0, 10),
y1 = runif(NLINEAS, 0, 10),
y2 = runif(NLINEAS, 0, 10))
plt1 <- ggplot(coords) + geom_segment(aes(x = x1, xend = x2,
y = y1, yend = y2),
color = "red") +
ggtitle("Generador automático de líneas rojas") +
xlab("Cosas intolerables (eje X)") +
ylab("Cosas intolerables (eje Y)")
print(plt1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment