How to remove black frame around the legend?

3 ビュー (過去 30 日間)
Arkadiusz Charuk
Arkadiusz Charuk 2024 年 8 月 29 日
回答済み: Star Strider 2024 年 8 月 29 日
How to remove the blach frame or make as white around the legend?
figure('Name','Legend')
plot(1,1)
plot(FP_plate_thickness(:,1),FP_plate_thickness(:,2),FP_plate_thickness(:,1),FP_plate_thickness(:,3),FP_plate_thickness(:,1),FP_plate_thickness(:,4),...
FP_plate_thickness(:,1),FP_plate_thickness(:,5),FP_plate_thickness(:,1),FP_plate_thickness(:,6),FP_plate_thickness(:,1),FP_plate_thickness(:,7),...
FP_plate_thickness(:,1),FP_plate_thickness(:,8), FP_plate_thickness(:,1),FP_plate_thickness(:,9),FP_plate_thickness(:,1),FP_plate_thickness(:,10),...
FP_plate_thickness(:,1),FP_plate_thickness(:,11),FP_plate_thickness(:,1),FP_plate_thickness(:,12),FP_plate_thickness(:,1),FP_plate_thickness(:,13),...
FP_plate_thickness(:,1),FP_plate_thickness(:,14), FP_plate_thickness(:,1),FP_plate_thickness(:,15),FP_plate_thickness(:,1),FP_plate_thickness(:,16),...
FP_plate_thickness(:,1),FP_plate_thickness(:,17),'LineWidth',3),
legend('Postać 1 - 62 Hz','Postać 2 - 134 Hz','Postać 3 - 174 Hz','Postać 4 - 228 Hz','Postać 5 - 252 Hz','Postać 6 - 291 Hz','Postać 7 - 321 Hz','Postać 8 - 458 Hz',...
'Postać 9 - 477 Hz','Postać 10 - 598 Hz','Postać 11 - 620 Hz','Postać 12 - 624 Hz','Postać 13 - 692 Hz','Postać 14 - 779 Hz','Postać 15 - 785 Hz','Postać 16 - 906 Hz','fontname','Aptos','FontSize',8,'Location','north'),
grid off, axis off
set(gca,'colororder',parula(16)) % to avoid color repetition in plotting lines
title('Legenda','FontSize',11,'fontname','Times New Roman')
axis([10,11,10,11])

採用された回答

Star Strider
Star Strider 2024 年 8 月 29 日
Add:
legend('boxoff')
after creatiing the plot.
See Legend Properties for more legend options.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by