stacked histogram and xaxis issues
古いコメントを表示
Hello, I`m plotting histograms and would like stack 2 data sets instead of having them overlap. The problem is i didn`t find any options for histograms to do that in Matlab. It seems you need to use bar, but then i get the issue of the xaxis ticks and labels. Does anyone know how to properly plot stacked histograms?
For bar plots, how do we set the xaxis ticks and labels? (i tried set(gca....) and d.Xtick...and it didn`t work.
thanks
3 件のコメント
dpb
2018 年 5 月 23 日
What, specifically, do you mean by "stacked histogram"? Can you show an image of what you think should look like or point to a link of a sample?
OCDER
2018 年 5 月 23 日
Is the stacked bar graph what you're looking for?
%Example from MathWorks website:
y = [2 2 3; 2 5 6; 2 8 9; 2 11 12];
bar(y,'stacked')
Yasmin Samy
2018 年 5 月 23 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Bar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!