How to increase the size of the legend marker in terms of scattering in MATLAB 2014b?

I found the marker size in the scatter plot, and the legend is different in MATLAB 2014b. I searched and found some solution from an earlier version of MATLAB that is not applicable in the latest version. In my current version, the size of the marker in the legend is so small that it is difficult to distinguish. Any help?

figure; 
hold on 
s1 = scatter(1, 1, 150, 'k', 'o') 
s2 = scatter(1, 2, 150, 'k', '+') 
s3 = scatter(2, 1, 150, 'k', 'x') 
h = legend('Circle', 'Plus', 'X', 'Location', 'NorthEast'); 
set(h, 'FontSize', 14) 
axis([0 3 0 3]) 

The size of the marker in the spread and legend is different. How to increase the size of the legend record marker and make it look like the size of a scatter plot.

+4
source share
1 answer

, icons legend MarkerSize , .

legend:

[h,icons,plots,legend_text] = legend('Circle', 'Plus', 'X', 'Location', 'NorthEast'); 

icons - 6x1, :

icons = 

  6x1 graphics array:

  Text     (Circle)
  Text     (Plus)
  Text     (X)
  Group    (Circle)
  Group    (Plus)
  Group    (X)

, Group.

( icons(4)), :

icons(4)

 Group (Circle) with properties:

    Children: [1x1 Patch]
     Visible: 'on'
     HitTest: 'off'

  Show all properties

, . , , ,

icons(Some index).Children.MarkerSize

4 6:

for k = 4:6
icons(k).Children.MarkerSize = 20;
end

:

enter image description here

, . R2015a, , R2014b.

, , !

+4

Source: https://habr.com/ru/post/1608028/


All Articles