title: Color by Column Values in Matplotlib
body: <p>One of my favorite aspects of using the <code>ggplot2</code> library in R is the ability to easily specify aesthetics. I can quickly make a scatterplot and apply color associated with a specific column and I would love to be able to do this with python/pandas/matplotlib.  I'm wondering if there are there any convenience functions that people use to map colors to values using pandas dataframes and Matplotlib?</p>
  <pre><code>##ggplot scatterplot example with R dataframe, `df`, colored by col3
  ggplot(data = df, aes(x=col1, y=col2, color=col3)) + geom_point()
  
  ##ideal situation with pandas dataframe, 'df', where colors are chosen by col3
  df.plot(x=col1,y=col2,color=col3)
  </code></pre>
  <p>EDIT:
  Thank you for your responses but I want to include a sample dataframe to clarify what I am asking. Two columns contain numerical data and the third is a categorical variable. The script I am thinking of will assign colors based on this value.</p>
  <pre class="lang-py prettyprint-override"><code>np.random.seed(250)
  df = pd.DataFrame({'Height': np.append(np.random.normal(6, 0.25, size=5), np.random.normal(5.4, 0.25, size=5)),
                     'Weight': np.append(np.random.normal(180, 20, size=5), np.random.normal(140, 20, size=5)),
                     'Gender': [&quot;Male&quot;,&quot;Male&quot;,&quot;Male&quot;,&quot;Male&quot;,&quot;Male&quot;,
                                &quot;Female&quot;,&quot;Female&quot;,&quot;Female&quot;,&quot;Female&quot;,&quot;Female&quot;]})
  
       Height      Weight  Gender
  0  5.824970  159.210508    Male
  1  5.780403  180.294943    Male
  2  6.318295  199.142201    Male
  3  5.617211  157.813278    Male
  4  6.340892  191.849944    Male
  5  5.625131  139.588467  Female
  6  4.950479  146.711220  Female
  7  5.617245  121.571890  Female
  8  5.556821  141.536028  Female
  9  5.714171  134.396203  Female
  </code></pre>