Bubblechartの凡例の色をグラフと揃える方法
显示 更早的评论
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;
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 データ分布プロット 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

