I have created two pareto charts in R, both using the same data. One using ggplots stat_pareto and the other with pareto.chart function from qcc library.
ggplot(DT4, aes(x = reorder(sap_object_type_desc, -sum_duration), y = 
  sum_duration)) + 
  geom_bar(stat="identity") +
  theme(axis.text.x=element_text(angle=90,hjust=1)) + 
  stat_pareto(point.color = "red",   
              point.size = 2,        
              line.color = "black",  
              #size.line = 1,        
              bars.fill = c("blue", "orange"))
Or using pareto.chart function
pareto.chart(avector, 
             ylab = "Sum", 
             # xlab = "Objective Type Description", 
             main = "Avector Pareto Chart",
             cumperc = c(20,40,60,80,100)) # or = seq(0, 100, by =25)
What I would like to do is adjust the second y axis on both of the above plots so that the 100% cumulative percentage aligns with the highest bar, like the third example. Any suggestions?



