title: Legend in multiple plots Matlab
body: <p>How can I put the legend on each graph separately like (figure 2)  instead of putting the legend on the side like (figure 1) ?</p>
  
  <p>Figure 1</p>
  
  <p><a href="https://i.stack.imgur.com/7qUJM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7qUJM.png" alt="enter image description here"></a></p>
  
  <p>Figure 2</p>
  
  <p><a href="https://i.stack.imgur.com/1Xhtq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Xhtq.png" alt="enter image description here"></a></p>