title: How do I define color groups based on numerical threshold values for ggplot2 scatterplot
body: <p>I have a data set that contains 2 variables <code>x</code> = event number &amp; <code>y</code> = assay amplitude. I am trying to create a scatterplot in <code>ggplot2</code> where all of the points that are <code>&gt; 3000</code> are colored in one color and all of the points <code>&lt; 3000</code> are in a different color.</p>
  
  <p>I can get the plot and change the color for all data points, but can't figure out how to define a color scheme based on the value threshold. </p>
  
  <p>Here is a sample of the data I'm using:</p>
  
  <pre><code>dat &lt;- data.frame(x=c(399, 16022, 14756, 2609, 1131, 12135, 
                                   7097, 12438, 12604, 14912, 11042, 
                                   14024, 7033, 4971, 15533, 4507, 4627, 
                                   12600, 7458, 14557, 3999, 3154, 6073),
                    y=c(3063.40137, 3687.42041, 3911.856, 
                                      4070.91748, 4089.99561, 4095.50317,
                                      4159.899, 4173.117, 4177.78955, 
                                      4186.46875, 4201.874, 4272.022, 
                                      638.615, 649.8995, 668.8346,
                                      688.754639, 711.92, 712.689636, 
                                      721.1352, 737.841, 741.0727, 
                                      755.2549, 756.730652))
  </code></pre>