How can you increase the width of the bars in a bar graph in MATLAB without causing the bars to overlap? The script below increases the bar width but the bars overlap:
graph = [ 1 2 ; 3 4 ; 5 6 ; 7 8 ];
bar(graph,'BarWidth',2);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way I know to do this is via multiple calls to bar.
The following will generate a bar chart with the bars occupying 90% of the total space.
The function BarSpecial as written is not general purpose but could be extended to handle a wider range of input data.