title: Is there a way to plot multiple horizontal lines using hlines() function in a single plot of matplotlib?
body: <p>I have an <strong>pm2_5</strong> dataframe data which I've plotted using a <code>matplotlib scatterplot</code>.
  I want to insert multiple horizontal lines at different <em>y-values</em>,
  I'm doing it by manually calling the '''ax.axhline''' function for each different value of <strong>y</strong>. Is there any way to automate the whole process?</p>
  <pre class="lang-py prettyprint-override"><code># making a graph with delineated health levels of pm2.5 in the year 2015
  fig, ax=plt.subplots(figsize=(10,7));
  pm2_5.plot(kind='scatter',x='S_no',y='pm2_5',c='pm2_5',ax=ax, cmap='tab20b');
  ax.axhline(y=150,linestyle ='--')
  ax.axhline(y=100,linestyle ='--')
  ax.axhline(y=200,linestyle ='--')
  ax.axhline(y=300,linestyle ='--')
  </code></pre>
  <p>Here is how it should look like:
  <a href="https://i.stack.imgur.com/ICIKi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ICIKi.png" alt="enter image description here" /></a></p>