ggplot2: different alpha values for border and filling of geom_point
<p>I want to plot my data as a dotplot using geom_point. My datapoints are overlapping, so I want to use jitter and transparency to increase visibility. Now I would also like to add a border to every datapoint to make it even more easier for the reader to see each datapoint. However, due to the alpha, it looks like my datapoints have halos around them. That's why I would like to use alpha only for the filling and alpha=0 for the border. But so far I haven't found a solution. I could plot two geom_points one being slightly larger than the other to create a border around each point with alpha=0. But becuase I need jitter, the same datapoints won't lie on top of each other.
Does anyone has an idea how to solve this problem?</p>

<p>Here is my code:</p>

<pre><code>ggplot(data=comp24, aes(x=spatial, y=lnfit, colour=spatial, fill=spatial, shape=spatial, backgroundColor="white", na.rm=T))+
geom_point(position=position_jitter(w=0.5), size=1.75, alpha=0.2, stroke=0.3)+
scale_colour_manual(name="spatial structure", values = c("black", "black", "black"))+
scale_fill_manual(name="spatial structure", values = c("black","black", "black"))
</code></pre>

<p>And some data:</p>

<pre><code>spatial focal competitor       lnfit
low   pco        pch -1.79175947
low   pco        pch -1.49165488
low   pco        pch -0.98082925
low   pco        pch -1.97716269
intermediate   pco        pch -0.84729786
intermediate   pco        pch -0.48379695
intermediate   pco        pch -0.64574494
intermediate   pco        pch -0.51082562
intermediate   pco        pch  1.43693809
high   pco        pch  0.89608802
high   pco        pch  0.04879016
high   pco        pch -2.20625398
high   pco        pch  0.31003898
high   pco        pch -0.01694956
</code></pre>

<p>Here is a detail of the graph, that shows the halo I am talking about. I guess it comes from filling and border overlapping a bit. That's why I see this draker line within the grey area. Changing the stroke value unfortunately only increases the halo effect.</p>

<p><a href="https://i.stack.imgur.com/lvMtg.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/lvMtg.jpg" alt=""></a></p>

<p>I save my graphs as .tif with:</p>

<pre><code>tiff('C:/_..._..._.tif', bg = "white", res = 1600, width = 115, height = 160, units = "mm", compression="lzw")
</code></pre>

<p>Looking forward to your suggestions.</p>

<p>Cheers
Anne</p>