19.3 Box plots

  • Simple boxplot showing the data distribution of sample 1:

  • Split the data into 2 boxes:

  • What if you want to plot both sample1 and sample2 ?
    You need to convert into a long format

What is the long format ?

Plotting both sample1 and sample2:

  • What if now you also want to see the distribution of “yes” and “no” in both sample1 and sample2 ?
    Integrate a parameter to the aes()

Do you want to change the default colors?

  • Integrate either layer:
    • scale_color_manual() for the boxes border color
    • scale_fill_manual() for the boxes color (inside)