title: Scatterplots to compare two data sets in R
body: <p>I would like to compare two datasets of the same length using scatterplots and then colour the differentially expressed genes based on the list of genes with specified p-values. To be more specific it looks something like below :</p>
  
  <p><img src="https://i.stack.imgur.com/YknwE.png" alt="enter image description here"></p>
  
  <p>Replacing the x-axis with data A and y-axis with data B and Significant  P value &lt;0.05) probes are shown in blue.</p>
  
  <pre><code> A = rnorm(100) ### datset A
  
   B = rnorm(100) ### datset B 
  
   p = rnorm(100) ### p-values
  </code></pre>
  
  <p>I tried to reproduce the same kind of plot by first producing a normal scatterplot . The data I originally have is for 15000 probes.</p>
  
  <pre><code>       col = rep('black', length(A))
         col[p&lt; 0.05] &lt;- 'blue'
         plot(A, B, col=col) 
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/eJ4tv.png" alt="enter image description here"></p>