How to enlarge legend symbols?
Asked Answered
S

1

1

I am plotting my data as

%% Plot relative wrt to GT for each frame
XIndx_lsd = linspace(1,592, size( accu_RE_lsdSlam, 1 ) );
XIndx_my = linspace(1,592, size( accu_RE_my_method, 1 ) );

plot( XIndx_lsd, accu_RE_lsdSlam(:,5), 'r-.' )
hold on
plot( XIndx_my, accu_RE_my_method(:,5), 'b-' )
AX=legend( 'rel translation error for Kerl et al.', 'rel translation error for D-EA' );

xhand = xlabel( 'Frame#' );
yhand = ylabel( '||trans(E_i)||_2 (in mm)' );
axis( [1 600 0 16] );

set(gca,'FontSize', 78);
set(xhand,'fontsize',78)
set(yhand,'fontsize',78)

I am able to get large font size. My question is how to get a large symbol size. See marked figure below.

enter image description here

Sidekick answered 16/9, 2015 at 4:59 Comment(1)
Is there still something missing? If not please consider accepting the answer. Thank you!Taryntaryne
T
2

Using an older answer of mine, which suggests to actually replot the legend symbols,

plot( 0:10, 0:10, 'b-' ); hold on;
plot( 0:10, 10:-1:0, 'r-' ); hold on;

%// Legend Style
style = @(LineStyle,LineWidth) plot(0,0,LineStyle,'LineWidth',LineWidth,'visible','off')
AX = legend( [style('b-',20),style('r-',20)], {'      Legend entry 2','      Legend entry 1'}, 'box','off' );

xlim([0 10]); ylim([0 10]);
xhand = xlabel( 'Frame#' );
yhand = ylabel( '||trans(E_i)||_2 (in mm)' );

set(gca,'FontSize', 28);
set(xhand,'fontsize',28)
set(yhand,'fontsize',28)

enter image description here

Taryntaryne answered 16/9, 2015 at 6:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.