Bubblechartの凡例の色をグラフと揃える方法
Mostrar comentarios más antiguos
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;
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre データ分布プロット en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

