making some change inside of the legend box

1 回表示 (過去 30 日間)
farfar
farfar 2019 年 2 月 5 日
コメント済み: TADA 2019 年 2 月 6 日
Hello
I have assigned color to my figures. legend box includes info about what color covers what range of data. when i change the font size, it only changes the size of the text inside of the legend box (ex: 0-100 cd) . please see the attachment. how can I change those dots to be more legible ? thanks !
L1 = (z > 0) & (z <= 100);
L2 = (z > 100) & (z <= 1000);
figure(1)
scatter3(x(L1), y(L1), z(L1), 'b', '.')
hold on
scatter3(x(L2), y(L2), z(L2), 'c', '.')
hold on
lgd =legend('0 - 100 cd/m2 ', '100 - 1000 cd/m2')
lgd.FontSize = 14;
lgn.JPG
  1 件のコメント
TADA
TADA 2019 年 2 月 6 日
Try This:
Worked For Me In R2017b

サインインしてコメントする。

回答 (1 件)

KSSV
KSSV 2019 年 2 月 6 日
YOu have to increase the marker sizes while plotting the data.
A = rand(10,3) ;
plot(A,'.','MarkerSize',10)
lgd = legend ;
lgd.FontSize = 14;
  1 件のコメント
farfar
farfar 2019 年 2 月 6 日
Thank you!
for some reason its not working for me. giving me this error:
Error using matlab.graphics.chart.primitive.Scatter/set
There is no MarkerSize property on the Scatter class.
Error in scatter3 (line 112)
set(h,'Parent',parax,'XData',x,...
and thats what I have:
L1 = (z > 0.001) & (z <= 5);
L2 = (z > 5) & (z <= 15);
figure(1)
scatter3(x(L1), y(L1), z(L1), 'b', '.', 'MarkerSize',10)
hold on
scatter3(x(L2), y(L2), z(L2), 'c', '.','MarkerSize',10)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by