I use the pareto.chart function from the qcc package in R and I really like it. Now I would like to port all my graphs to use the ggplot2 package instead. However, my knowledge of ggplot2 is very limited, despite the excellent documentation, so I cannot figure out all the details. Basically, I need a plot similar to this

but instead made with the ggplot2 package. The code for creating the chart is shown below:
library(qcc)
defect <- c(80, 27, 66, 94, 33)
names(defect) <- c("price code", "schedule date", "supplier code", "contact num.", "part num.")
pareto.chart(defect, ylab = "Error frequency", col=heat.colors(length(defect)))
Does anyone have a solution for this? The Pareto chart has been discussed up to here , but the result does not look something like what I want.
source
share