library(tidyverse)
## ── Attaching packages ────────────────
## ✔ ggplot2 3.0.0     ✔ purrr   0.2.5
## ✔ tibble  1.4.2     ✔ dplyr   0.7.6
## ✔ tidyr   0.8.1     ✔ stringr 1.3.1
## ✔ readr   1.1.1     ✔ forcats 0.3.0
## ── Conflicts ─────────────────────────
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggbeeswarm)
diamonds %>% sample_n(1000) %>% filter(cut %in% c("Ideal","Very Good")) %>% 
  mutate(ppc = price/carat) -> divg
divg %>% 
  ggplot(aes(ppc)) +
  geom_density() +
  facet_wrap(~cut,ncol=2)

divg %>% ggplot(aes(cut,ppc)) + 
  geom_beeswarm()

divg %>% ggplot(aes(cut,ppc)) +
  geom_violin()