Reputation: 1316
I wrote the code below to make a bar graph but the problem is that the width of the bar is very big and i need to make the width thinner, when i change it from the fig properties the whole graph become smaller .. any help?
x = [2,3,4,5,6];
y = [80.32,95.2,92.6,75.6,65.7]
figure;
bar(x,y,'b');
Upvotes: 1
Views: 1404
Reputation: 112689
You can use a third input argument to bar
which specifies width:
bar(x,y,.4,'b'); %// change ".4" as needed
Upvotes: 4