フィルターのクリア

How to entirely show the first and last bars?

4 ビュー (過去 30 日間)
Ibrahs
Ibrahs 2022 年 11 月 14 日
コメント済み: Ibrahs 2022 年 11 月 15 日
Hello,
I have the following Bar and code; I don't know why the first and last bars are not entierely displaying. Just the half of those bars are shown.
Please anyone can help me to fix this? Thank you in advance.
f = figure;
bb=bar(TimeSub_num,DecompS_p,'stacked');
bb(1).FaceColor = [0.9 0.8 0];
bb(2).FaceColor = [0 0.4470 0.7410];
bb(3).FaceColor = [1 0 0];
hold on
grid on
bb=bar(TimeSub_num,DecompS_n,'stacked');
bb(1).FaceColor = [0.9 0.8 0];
bb(2).FaceColor = [0 0.4470 0.7410];
bb(3).FaceColor = [1 0 0];
xticks(TimeSub_num(48:end));
xticklabels(TimeSub_num(48:end));
datetick('x', 'yyyymm','keepticks');
legend('A','B','C', 'Location', 'NorthWest')

採用された回答

Image Analyst
Image Analyst 2022 年 11 月 14 日
Adjust xticks or xlim to show more of the x axis.
  1 件のコメント
Ibrahs
Ibrahs 2022 年 11 月 15 日
thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeBar Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by