I've got 6000 reports. For each report, I've got how many garbage there is in the report. So I can make a histogram of this:
boundaries = seq(0,1 , by=0.01)
hist(hoeveel_rommel_per_rapport, breaks=boundaries)
where hoeveel_rommel_per_rapport
is a vector that describes the garbage for each reports.
Now I've got a cluster number for each report. I want to give all the clusters a different color in the histogram. Is this possible?
So for example, the first stack contains 3 different clusters, so it gets 3 colors.
I'd be inclined to use
ggplot
for something like this. Here are some approaches using made up data (in future, you should provide your data, or at least a representative sample).This is seems like what you were looking for - a stacked histogram.
This puts the three histograms in different panels - much clearer.
Overlapping density plots in one panel.