How can I resize the boxes in a boxplot created with R and ggplot2 to account for different frequencies amongst different boxplots? [duplicate]
问题 This question already has answers here : Is there an equivalent in ggplot to the varwidth option in plot? (2 answers) Closed 5 years ago . I have a boxplot that I made in R with ggplot2 analagous to the sample boxplot below. The problem is, for the values on the y axis (in this sample, the number of cylinders in the car) I have very different frequencies -- I may have included 2 8 cylinder cars, but 200 4 cylinder cars. Because of this, I'd like to be able to resize the boxplots (in this case