I have 3 temperature values for January, one for February and one for march. I want to draw them on one bar graph. I used the overlay method in matlab to draw the 3 values for January. But when I plot the other 2 months, they overlay January. How to enforce February and march values to be side by side to January.
Update: I added the output of running the code below, and changes I want to have
temp_high = [12.5];
w1 = 0.5;
bar(x,temp_high,w1,'FaceColor',[0.2 0.2 0.5])
temp_low = [10.7];
w2 = .25;
hold on
bar(x,temp_low,w2,'FaceColor',[0 0.7 0.7])
temp_very_low = [7.1];
w2 = .1;
hold on
bar(x,temp_very_low,w2,'FaceColor',[0 0 0.7])
ax = gca;
ax.XTick = [1];
ax.XTickLabels = {'January'};
ax.XTickLabelRotation = 45;
name={'feb';'march'};
y=[5 ;
3 ]
bar_handle=bar(y);
set(gca, 'XTickLabel',name, 'XTick',1:numel(name))
ylabel('Temperature (\circF)')
legend({'jan 1-with 1-instance','jan 1-with 2-instance','jan 1-with 3-instance','feb', 'march'},'Location','northwest')