Search code examples
rggplot2boxplotoutliers

Is there a value in outlier.shape, or another approach for geom_boxplot, that will result in ring circle outliers?


I was wondering if it is possible to have outliers that appear in geom_boxplot as ring circles like those shown here:

enter image description here

I can change the shapes to triangles, squares, asterixs, etc. by changing the values in outlier.shape but all appear to be filled. Any ideas?

On a side note is there any documentation that informs you what each value equates to in outlier.shape instead of trial and error? I've had zero luck searching online for such a source.

Thanks in advance.


Solution

  • The shape codes in ggplot are the same as in base R. See for example here.

    Number 1 is an empty ring.

    For example:

    qplot(y = c(1, 50:55), x = 1, geom = 'boxplot', outlier.shape = 1, outlier.size = 5)
    

    enter image description here