19.5 Bar plots

  • Customize:
    • scale_x_discrete is used to handle x-axis title and labels
    • coord_flip swaps the x and y axis

19.5.1 Bar plots with error bars

We can create error bars on barplots.
Let’s create a toy data set, that contains 7 independent qPCR measurements for 3 genes:

The height of the bar will represent the average qPCR measurement. The error bar will represent the average - standard deviation on the lowe part, and the average + standard deviation on the high part.
We need to create a data frame that summarizes these values:

And now we can plot!