Reputation: 23593
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?
Upvotes: 7
Views: 30485
Reputation: 23593
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'});
Upvotes: 12