This is my code where i am plotting two bar plot in one graph. However my first graph should be case:28 then case:29 as mentioned by the title. But my code is always skipping the first graph and pushing it at the end without anykind of label and title. I also attached my graph.
C28=rand(5,1);figure(1)title('Case:28','fontsize',10,"fontweight","Bold");xlabel('Kinetic Mechanisms')ylabel('SSE')subplot(2,4,1)hold onfor i = 1:length(C28) h=bar(i,C28(i)); if C28(i) == min(C28) set(h,'FaceColor','b'); elseif C28(i) == max(C28) set(h,'FaceColor','r'); else set(h,'FaceColor','k'); end endC29=rand(5,1);figure(1)title('Case:29','fontsize',10,"fontweight","Bold");xlabel('Kinetic Mechanisms')ylabel('SSE')box onsubplot(2,4,2)hold onfor i = 1:length(C29) h=bar(i,C29(i)); if C29(i) == min(C29) set(h,'FaceColor','b'); elseif C29(i) == max(C29) set(h,'FaceColor','r'); else set(h,'FaceColor','k'); endendhold off
Best Answer