How can I enlarge the height of legend box?
37 views (last 30 days)
I would like to enlarge the legend box size (height), I tried to use [set(hleg1,'position',[x0 y0 width height])]
and [textobj = findobj(hobj1, 'type', 'text');set(textobj, 'Interpreter', 'latex', 'fontsize', 15);] but didn't work..
Thanks in advance, Riyadh
Adam Danz on 26 Sep 2018
You need to use the handle to the legend which you create when you call legend(). The height is the 4th value of the Position parameter. Here I set the height to 10.
lh = legend('BlankLegend');
lh.Position(4) = 10;