title: Plotting Two Factors on the same Graph
body: <p>Say I have two factors and I want to graph them on the same plot, both factors have the same levels.</p>
  
  <pre><code>s1 &lt;- c(rep("male",20), rep("female", 30))
  s2 &lt;- c(rep("male",10), rep("female", 40))
  s1 &lt;- factor(s1, levels=c("male", "female"))
  s2 &lt;- factor(s2, levels=c("male", "female"))
  </code></pre>
  
  <p>I would have thought that using the table function would have produced the correct result for graphing but it pops out.</p>
  
  <pre><code>table(s1, s2)
          s2 
  s1       male female   
  male     10     10   
  female    0     30
  </code></pre>
  
  <p>So really two questions, what is the table function doing to get this result and what other function can i use to create a graph with 2 series using functions with the same levels?</p>
  
  <p>Also if it is a factor I'm using barplot2 in the gplots package to graph it.</p>