I want to separate the two graph bars shown in the below figure
this is the code I'm using:
bar(uu,nn/numel(n));
hold on
bar(uu1,nn1/numel(n1),'r');
hold off
, but I want them to be like this:
Update:
I'm using the below code suggested by Shai but the fig. is now not correct, as there is white space in the beginning and the values of the y axis are not correct
:

bar(uu-.5, nn/numel(nn), .5);hold all;bar(uu1, nn1/numel(nn1),.5,'r');
hleg = legend('Kinect','Xtion','Location','NorthEast');
uuanduu1are related? - Shaibar(uu-.5, nn1/numel(nn1), .5);hold all;bar(uu1, nn1/numel(nn1),.5);- Shainumel(nn)instead ofnumel(n)(same fornn1). - this should fix your y-axis. - Shai