title: How to plot line chart with conditional color in pandas dataframe
body: <p>I would like you can help me to figure out how can I  plot a dataframe where Y values &gt;60 should be be color red and &lt; 60 black color.</p>
  <p>here is my code , but is not plotting as I expect.</p>
  <p>while True:</p>
  <pre><code>time.sleep(2)
  gc = gspread.service_account(filename='python_credential.json')
  sh = gc.open('Temperatura (Respuestas)').sheet1
  lista = sh.get_all_records()
  df = pd.DataFrame(lista) 
  
  fig = plt.figure()
  print(df)
  x = df['Marca temporal']
  y = df['Temperatura']
  
  plt.plot(x,y)
  y[df['Temperatura']&gt;60].plot(color = 'red')
  #y[df['Temperatura']&lt;60].plot(color = 'blue')
  plt.pause(0.01)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/pfY0r.png" rel="nofollow noreferrer">enter image description here</a></p>