How to set the space between bars?
100 次查看(过去 30 天)
显示 更早的评论
Dear all,
I would like to set up the distance between bars, Is that possible to reduce the distance between them.
md data is: x = [5493,25255;5493,25255]
Help me please....
0 个评论
回答(2 个)
Walter Roberson
2019-5-7
bar position is controlled by the x you pass in to bar().
The third parameter to bar() controls bar width
To get your bars closer together like you illustrate, you will need to either change the x values that you pass in, or else you will need to use a smaller axes so that they crowd together more. Or you could increase your xlim upper limit which would give you a bunch of white space on the right hand side and the bars crowded more together towards the left, I suppose.
0 个评论
Hunter Pruett
2020-5-23
Just finished the following function that I think will help you with this:
https://www.mathworks.com/matlabcentral/fileexchange/75853-barmod
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Specifying Target for Graphics Output 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!