Hello everyone, I plot this bar plot in order to show the difference between each model (3 models) in condition A and condition B. x = rand(3,2);
x = rand(3,2);h = bar (x);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/337594/image.jpeg)
I want to set, for example, red for the first model in condition A and blue for condition B (In this model).
As well as two different colors like green and yellow for the second model in each condition. Like this plot below:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/337597/image.jpeg)
And also, set the corresponding legend for each color. So I want to have 6 items in legend (different colors).
Any suggestion is really helpful
Thank you.
Best Answer