title: How can I automatically display a legend so that it touches the border of a corner in a Matlab (R 2019b) plot?
body: <p>I know how to use the 'Location' input of the legend function, but none of the options put the legend right in the corner, they all leave a small space between the legend and the border of the plots. I've seen that it's possible to specify the location with a vector but I did not understand how to do it. Any help is appreciated. </p>