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?
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'});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With