ggplot2 geom_bar

When running the code below,"..prop.." confused me,the result is equal when I replace it by "stat(prop)",so what ".. .."means,is it a default code in R

ggplot(data = diamonds) + 
  geom_bar(mapping = aes(x = cut, y = ..prop..))

They are the same thing, ..prop.. is using the old syntax and stat(prop) is using the current one. They both work for compatibility purposes, to avoid breaking legacy code.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.