Stacked bar plots - individual editing?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi guys! Basically I need to have something like the bar plot below, but need to be able to change the color of the individual squares, as well as giving them the appropriate label (the blue square in PM subdivide into the 2 squares in PM10).
Using 'grouped' instead of 'stacked' does not solve my problem. Also tried to create each stacked bar (each column) separately and then put them in the same graph, but this does not work out. I guess my problem is related with the input arguments to build the bar plot, but how to change this so that the shown strucuture is kept, while each "value" (square) can be edited independently (color, labelling)?
Any help is appreciated!
That image is created with this code - detsize{i} with i=3 to 6, are values extracted from a table:
sizeclass_stack1 = [detsize4{4} detsize4{3}; detsize4{6} detsize4{5}];
bar(sizeclass_stack1,'stacked')
title(sprintf('%s_',filename));
ylabel('Particle size distribution (%)','FontSize',12,'FontWeight','bold');
labels = {'PM';'PM_{10}'};
set(gca,'xticklabel',labels)
0 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Bar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!