Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display legend in bottom right corner instead of top right?

Normally the legend appears in the top-right corner when using the command

legend('aa', 'bb', 'cc', 'dd')

But that blocks my curves.

How to place it in the bottom-right corner instead?

like image 516
Evgeni Sergeev Avatar asked Sep 30 '13 02:09

Evgeni Sergeev


1 Answers

It's simple:

legend('aa', 'bb', 'cc', 'dd', 'Location','SouthEast');

How then does it distinguish between labels and arguments? It doesn't. So if you say

legend('aa', 'bb', 'cc', 'dd', 'Location');

it will throw an error. So, if "Location" is one of your labels, use

legend({'aa', 'bb', 'cc', 'dd', 'Location'});
like image 134
Evgeni Sergeev Avatar answered Sep 30 '22 16:09

Evgeni Sergeev