Adjust the bar width dynamic for plotting

Hello again I have another plotting problem. I have multiple data bases and I want to plot them with the bar function. But in some cases the bars look normal like:
and sometimes they look like:
I tried to change the bar width with 'BarWidth' for the second one and it helps but later when I plot the first one again the bars are much too wide... Is there a way to adjust the bar width dynamic?

类别

帮助中心File Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by