Skip to content

Instantly share code, notes, and snippets.

@JuveCampos
Last active January 31, 2020 16:50
Show Gist options
  • Save JuveCampos/04d2b98f3ebaf450b07923622a0a4c14 to your computer and use it in GitHub Desktop.
Save JuveCampos/04d2b98f3ebaf450b07923622a0a4c14 to your computer and use it in GitHub Desktop.
### Grafica ----
ggplot(pop, aes(x = `Grupos quinquenales de edad`,
y = `Poblacion por Sexo`,
fill = Sexo)) +
geom_col(data = subset(pop, Sexo == "Hombres") %>%
mutate(`Poblacion por Sexo` = -`Poblacion por Sexo`),
width = 0.5, fill = "blue") +
geom_col(data = subset(pop, Sexo == "Mujeres"),
width = 0.5, fill = "pink") +
coord_flip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment