title: plot different color for different categorical levels using matplotlib
body: <p>I have this data frame <code>diamonds</code> which is composed of variables like <code>(carat, price, color)</code>, and I want to draw a scatter plot of <code>price</code> to <code>carat</code> for each <code>color</code>, which means different <code>color</code> has different color in the plot.</p>
  <p>This is easy in <code>R</code> with <code>ggplot</code>:</p>
  <pre><code>ggplot(aes(x=carat, y=price, color=color),  #by setting color=color, ggplot automatically draw in different colors
         data=diamonds) + geom_point(stat='summary', fun.y=median)
  </code></pre>
  <p><img src="https://i.stack.imgur.com/HW43K.png" alt="enter image description here" /></p>
  <p>I wonder how could this be done in Python using <code>matplotlib</code> ?</p>
  <p>PS:</p>
  <p>I know about auxiliary plotting packages, such as <code>seaborn</code> and <code>ggplot for python</code>, and I don't prefer them, just want to find out if it is possible to do the job using <code>matplotlib</code> alone, ;P</p>