title: R ggplot: How to create a scatter plot with marginal box plots
body: <p>My data looks like this:</p>
  
  <pre><code>d1 &lt;- read.table(header = TRUE, text =                   
                     "a1c   att  status
                   8.500000 23.58333  case
                   8.450000 12.25000 control
                   8.266667 18.91667 control")
  
  a1c   att  status
  1  8.500000 23.58333  case
  2  8.450000 12.25000 control
  12 8.266667 18.91667 control
  </code></pre>
  
  <p>I would like to make a boxplot of joint distribution of <code>a1c</code> and <code>att</code> (say a1c on x axis and att on y axis) and have dots in boxplots colored by <code>status</code> in the 3rd column. Say case would be red plots and control blue dots.</p>
  
  <p>So far I tried this:</p>
  
  <pre><code>ggplot(data = d1, aes(x = a1c, y = att, group=status)) +     
   geom_boxplot(colour = d1$status) + geom_jitter(position = position_jitter(
   width = .1, height=0))
  </code></pre>
  
  <p>I am getting this warnings:</p>
  
  <blockquote>
    <p>In addition: Warning messages: 1: Removed 68 rows containing missing
    values (stat_boxplot).  2: Removed 5 rows containing non-finite values
    (stat_boxplot).</p>
  </blockquote>
  
  <p>Thanks,</p>