title: How to plot two colors in the one line by other columns value?
body: <p>I have a dataframe like this:</p>
  
  <pre><code>df=pd.DataFrame([[1.65, -0.05, 0],
                   [1.68, -0.01, 0],
                   [1.70, 0.01, 1],
                   [1.67, -0.02, 1],
                   [1.73 , 0.05,  1],
                   [1.67 , 0.01,  1],
                   [ 1.67, -0.02,   1],
                   [1.70 , 0.03,  0],
                   [ 1.66, -0.01,  0],
                   [ 1.69 ,-0.01 , 0]
                   ])
  df.rename(columns={1: "diff", 2: "label"},inplace=True)
  df['label']=df['label'].astype(str)
  print(df)
         0   diff   label
  
  0    1.65 -0.05     0
  1    1.68 -0.01     0
  2    1.70  0.01     1
  3    1.67 -0.02     1
  4    1.73  0.05     1
  5    1.67  0.01     1
  6    1.67 -0.02     1
  7    1.70  0.03     0
  8    1.66 -0.01     0
  9    1.69 -0.01     0
  </code></pre>
  
  <p>I want to plot first columns and give it different color by 'label' column.</p>
  
  <p>label=1 blue , label=0 red</p>
  
  <p>That is , there are two colors in the one line.</p>
  
  <p>I use the following code to plot.</p>
  
  <pre><code>df.iloc[0:2,0].plot(y=df.columns[0],color='r', )
  df.iloc[1:7,0].plot(y=df.columns[0],color='b' )
  df.iloc[6:10,0].plot(y=df.columns[0],color='r' )
  </code></pre>
  
  <p>Have any better method to plot?</p>
  
  <p>In fact,the real data have 10000 rows</p>