Hello Matlab community,
I'm struggeling with formatting of a legend in a Matlab Plot. As the line of the legend is rather long in default I changed it with the help of icon objects.
icons(1).Position = [0.1 p1(2) 0.01 ];
icons(2).XData = [0.05 0.01];
This works and the legend line length gets sized. The following problem is that the width of the legend remains constant and does not resize. I tried to manipulate the position object of the legend but the width seems to have an internal lower limit.
I can increase the size but not decrease. I tried reverse engineering via Matlab Plot Browser and here the same problem occurs. When I try to decrease the width the box moves to the left and has same size.
This is what it looks like (the legend is flushed with another script, but disabling this one leads to the same problem):
I would appreciate some hints where to further search in order to resize the legend size.
Thanks in advance Simon