Is it possible to filter out subsets of data that have a small number of observations in a ggplot2 call?
For example, take the following chart: qplot(price,data=diamonds,geom="density",colour=cut)

The plot is a little busy, and I would like to exclude the values cutwith a small number of observations, i.e.
> xtabs(~cut,diamonds)
cut
Fair Good Very Good Premium Ideal
1610 4906 12082 13791 21551
quality Fairand Goodfactor cut.
I want a solution that can correspond to an arbitrary data set and, if possible, can choose not only the threshold number of observations, but also, for example, from above 3.
James source
share