How to fit legend inside a figure
14 次查看(过去 30 天)
显示 更早的评论
i need to plot 250 signals at a time so what the best way to fit all the legends(250) next to plot.
now only few legends are visible(say 50) due to space constraints
0 个评论
采纳的回答
Jan
2012-10-27
A search in the FEX is a good idea: See FEX: legendgrid, FEX: legendflex, FEX: columnlegend, FEX: gridlegend.
But I doubt, whether a legend with 250 entries can be useful at all. Finding the corresponding line in the diagram will be very time consuming. Perhaps there is visualization which has a much higher usability.
更多回答(1 个)
Matt Fig
2012-10-27
Even with fontsize 1 the entries are not visible. I think you could make your own legend, but it would require a bit of HG fun and still take up most of the figure. Perhaps you need to rethink your approach...
plot(rand(250))
L = legend(regexp(sprintf('A%i;',1:250),';','split'));
set(L,'fontsize',1)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!