This is my first post and I'm a real newbie to coding so forgive me if this isn't the most concise question.
I am trying to plot a histogram of pixel intensities for 3 different groups as an overlay with density curves for each group, similar to the image attached here.
The count values and bins for the histograms have been precalculated elsewhere and I don't have access to the raw data. There should be 64 bins in total, one for each pixel intensity (0-63) and then a count for each group (Vehicle, SB-3CT and SB-3CT + OVZ) within each bin. Is there a way to plot the data in the way I have described using ggplot2 or something similar?
The data is organised like so:
`# A tibble: 6 × 4
`Pixel intensity` Vehicle `SB-3CT` `SB-3CT + OVZ`
<dbl> <dbl> <dbl> <dbl>
1 0 0.0896 0.0896 0.104
2 1 0.383 0.383 0.408
3 3 1.35 1.35 1.36
4 4 3.43 3.43 3.79
5 5 6.91 6.91 7.45
6 6 12.0 12.0 13.5 `
I have tried using ggplot2.histogram but because this is precalculated data rather than raw data, this function just ends up calculating the frequency of each count which isn't what I'm trying to look at.