title: If I have 4 coordinates making a rectangle, how can I color in that area?
body: <p>I have 4 coordinates assigned to variables, so I would just like to colour in the rectangle that is created from these variables. I tried the fill function, but I cant gather much information from the example. </p>
  
  <p>When I try to use:</p>
  
  <p><code>fill(bottom left point, top right point,'g')</code></p>
  
  <p>the figure it makes only shows a line between those points, and doesn't colour in the entire area.</p>
  
  <p>I'm using MATLAB R2019b, if that helps.</p>
  
  <p>Also, if its possible to fill the rectangle with a pattern instead, please let me know aswell.</p>
  
  <p>Thanks in advance</p>