title: Is there a way to mark the min and max of a line chart on its y axis in matplotlib?
body: <p>I'm trying to make a graph I've generated a little more useful in comparisons. Is there a way to make something like I've pictured below? Or possibly a way to draw a line across along the y value of the max and min?</p>
  
  <p>I've tried using max() and min() and placing it in a plot like so:</p>
  
  <pre><code>plt.plot(dat[0]['end_date'], max(dat[0]['pct']))
  </code></pre>
  
  <p>Which throws a value error because the x list has something like 48 entries whereas the y list would only have one. </p>
  
  <pre><code>ValueError: x and y must have same first dimension, but have shapes (48,) and (1,)
  </code></pre>
  
  <p>Could I use some version of this that somehow fills the remaining 47 spaces with that same max value?</p>
  
  <p>Thank you!</p>
  
  <p><a href="https://i.stack.imgur.com/r4MZS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r4MZS.png" alt="Mentioned Above"></a></p>