Bubblechartの凡例の色をグラフと揃える方法
Show older comments
Bubblechartを使いグラフを書いています。Bubbleの色と凡例の色を揃えたいのですが、下記のようなコードでは凡例のBubbleの色が灰色になってしまいます。凡例の3つのBubbleをグラフ内のBubbleと同じ色に揃えるためにはどのようにすれば良いのでしょうか。ご教示お願いいたします。
Bubblesz = rand(5, 1, 5);
x = 10:10:50;
Ybubble = 1 : 5;
for l = 1:size(Bubblesz, 3)
for n = 1 : size(Bubblesz, 1)
sz = Bubblesz(n, 1, l);
bubblechart(x(l), Ybubble(n), sz, "yellow", 'MarkerFaceAlpha',0.20, 'MarkerEdgeColor', 'black')
hold on
end
end
hold off
xticks([10 20 30 40 50])
ylim([0 6])
yticks([1 2 3 4 5])
% 凡例
blgd = bubblelegend;
blgd.Location = 'southeastoutside';
blgd.NumBubbles = 3;
Accepted Answer
More Answers (0)
Categories
Find more on データ分布プロット in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

