having legend title and enlarging legend marker size at the same time
3 ビュー (過去 30 日間)
古いコメントを表示
Initially I had a legend as like this
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/420783/image.jpeg)
As you can see, the size of the legend marker is much smaller than the size of the scatter marker. However, the legend has a title. I used below code for this:
lgd=legend('25','50','75','100','Location','northwest','FontSize',30);
lgd.Title.String = 'Recoating Velocity (%)';
lgd.Title.FontSize = 30;
Then, in order to increase the marker size in the legend, I used the icons as below:
[lgd,icons,plots,legend_text] = legend('25','50','75','100', 'Location', 'Northwest')
for k = 5:8
icons(k).Children.MarkerSize = 20;
end
lgd.Title.String = 'Recoating Velocity (%)';
lgd.Title.FontSize = 30;
And the result looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/420788/image.jpeg)
Although the marker size increased, but the legend title is not applied. Why is that? How to fix it?
0 件のコメント
回答 (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!