title: ggvis: How can I plot abline when x variable is categorical?
body: <p>I've searched for some solutions here but only found it for the case when x variable is numeric. So, for example, I have this dataset:</p>
  
  <pre><code>read.table(text="         bias           scenery algorithm treatment
   0.0038245022 pi10_40_cens35_40   Method1        T0
   0.0004553608 pi10_40_cens35_40   Method1        T1
   0.0217874958 pi10_40_cens35_40   Method2        T0
   0.0132069964 pi10_40_cens35_40   Method2        T1
   0.0135420058 pi10_40_cens35_40   Method4        T0
   0.0157829608 pi10_40_cens35_40   Method4        T1
   0.0230633621 pi10_40_cens35_40   Method3        T0
   0.0199919247 pi10_40_cens35_40   Method3        T1
   0.0751254422 pi10_40_cens60_65   Method1        T0
   0.0678869679 pi10_40_cens60_65   Method1        T1
   0.1037620465 pi10_40_cens60_65   Method2        T0
   0.0819120457 pi10_40_cens60_65   Method2        T1
   0.0893472639 pi10_40_cens60_65   Method4        T0
   0.0825019605 pi10_40_cens60_65   Method4        T1
   0.1031913181 pi10_40_cens60_65   Method3        T0
   0.1149319836 pi10_40_cens60_65   Method3        T1
   0.0048517692 pi20_30_cens35_40   Method1        T0
   0.0079070239 pi20_30_cens35_40   Method1        T1
   0.0203992390 pi20_30_cens35_40   Method2        T0
   0.0197634214 pi20_30_cens35_40   Method2        T1
   0.0142908113 pi20_30_cens35_40   Method4        T0
   0.0197736578 pi20_30_cens35_40   Method4        T1
   0.0216825265 pi20_30_cens35_40   Method3        T0
   0.0232048669 pi20_30_cens35_40   Method3        T1
   0.0576654516 pi20_30_cens60_65   Method1        T0
   0.0629337504 pi20_30_cens60_65   Method1        T1
   0.0954706388 pi20_30_cens60_65   Method2        T0
   0.0926100594 pi20_30_cens60_65   Method2        T1
   0.0793831867 pi20_30_cens60_65   Method4        T0
   0.0866745996 pi20_30_cens60_65   Method4        T1
   0.1020244131 pi20_30_cens60_65   Method3        T0
   0.1090028420 pi20_30_cens60_65   Method3        T1", 
             header=TRUE, stringsAsFactors=FALSE) -&gt; tbl_sample
  </code></pre>
  
  <p>The plot that I have interest (without the abline) is obtained by:</p>
  
  <pre><code>tbl_sample %&gt;%
    group_by(algorithm) %&gt;% 
    ggvis(~scenery,~bias, fill=~algorithm,  shape=~treatment) %&gt;% 
    add_legend("fill", properties = legend_props(legend = list(y = 20))) %&gt;% 
    add_legend("shape", properties = legend_props(legend = list(y = 120))) %&gt;%
    add_axis("y",title="bias") %&gt;%
    layer_points() 
  </code></pre>
  
  <p>Static version:</p>
  
  <p><a href="https://i.stack.imgur.com/hzZ0m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hzZ0m.png" alt="enter image description here"></a></p>
  
  <p>Now then, how can I obtain exactly the same graph but with an dashed horizontal line on y=0?</p>