I have data in the form of this table. There are two conditions: Treated and Untreated.
Condition | ENSG | average raw counts |
---|---|---|
Untreated | ENSG00000260456 | 1.190091e-05 |
Treated | ENSG00000183570 | 2.935156e-05 |
I'm interested in making a box plot with the data in this format (i.e. red = treated, teal = untreated).
The code I have thus far makes a box plot by separating the x axis into bins, but I would like to have something that looks like the plot image above.
p <- joinSum %>%
mutate( bin=cut_width(`sumcol1`, width=0.00075, boundary=0) ) %>%
ggplot( aes(x=bin, y=joinSum$avg_rep) ) +
geom_boxplot(fill="#69b3a2") +
xlab("Bin")
print(p)
Here is an image of my current plot: