I'm looking to sort a stacked graph as demonstrated here: How to plot multiple stacked histograms together in R?
However I need the x axis not to be 'value' with numbers, but instead have groups like 'car' 'van' 'bike', with the stacked plots occuring for each group. I'm not great at R yet and I can't work out how to edit it to do what I need. Explanations to solutions so I can learn and improve would also be really appreciated. Thanks
Output plot would have 'car', 'van', 'bike' on the x axis, 'count' on y axis, the stack on each group being made up of the 'red', 'blue', 'yellow' counts
I think I may have found the answer here:https://r-charts.com/part-whole/stacked-bar-graph/
If no ones solves it before I've had a go at the above link I may sort an answer myself, will see how things go.