How to set the space between bars?
111 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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....
![data1_published.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/218469/data1_published.png)
0 Kommentare
Antworten (2)
Walter Roberson
am 7 Mai 2019
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 Kommentare
Hunter Pruett
am 23 Mai 2020
Just finished the following function that I think will help you with this:
https://www.mathworks.com/matlabcentral/fileexchange/75853-barmod
0 Kommentare
Siehe auch
Kategorien
Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!