title: How to make the left side of the pyramid graph on R be positive
body: <p>I am making a pyramid graph on Rstudio and I don't know why the left side of my pyramid is negative(I would like positive values)</p>
  
  <p>code:    </p>
  
  <pre><code>r piramide, include = FALSE}
  label_sexo &lt;- c('0' = "Masculino",'1' = "Feminino")
  
  idades &lt;- base_matriculas_final[,list(matriculados = 
  length(unique(id_aluno))),
                                   by = c("vila","sexo_adj","idade")]
  base_matriculas_final[,sexo_label := sexo_adj %&gt;% factor(labels = 
  label_sexo)]
  base_matriculas_final[,idade_5 := (idade %/% 5)*5]
  
  idades_prop &lt;- base_matriculas_final[idade_5 &lt;= 70,
                                       list(N = length(unique(id_aluno))),
                                       by = 
  c("sexo_label","vila","idade_5","sexo_adj")]
  
  idades_prop &lt;- idades_prop[,prop := 100*ifelse(sexo_label =="Masculino",
                                                 -N/sum(N),
                                                 N/sum(N)),
                             by = vila]
  max_prop &lt;- idades_prop[,max(abs(prop),na.rm = T)]
  max_prop &lt;- ifelse(max_prop &gt; 20, 25, 20)
  
  piramides &lt;-
    lapply(split(idades_prop, by =  "vila"),
           function(data){
             vila_n &lt;- data[,unique(vila)]
             ggplot(data,
                    aes(x = idade_5,y = prop,
                geom_bar(data = subset(data,sexo_adj == 1),
                        stat = "identity") + 
               geom_bar(data = subset(data,sexo_adj == 0),
                        stat = "identity") + 
               geom_text(aes(label = format (prop, digits=2)), 
                         hjust = "outward", size = 2,
                         position = position_dodge(width = 1), check_overlap = 
  TRUE) + 
               scale_y_continuous(labels = abs,
                                  limits = max_prop*c(-1,1),
                                  breaks = seq(-max_prop, max_prop, by = 5)) +  
               scale_x_continuous(expand=c(0,0), breaks = seq(0,120, by = 5)) 
  +
               coord_flip() +
               labs(title = vila_n,
                    y = "% de pessoas",
                    x = "Idade (5 em 5 anos)",
                    fill = "Gênero") -&gt; plot_vila
             plot_vila
             })
  +  theme_bw()
  </code></pre>
  
  <p>First I thought the problem were the labels, but I think it isn't.</p>
  
  <p>Picture Graph: </p>
  
  <p><img src="https://i.stack.imgur.com/20kEf.png" alt="1"></p>