erocoar / ggpol

🌍 Parliament diagrams and more for ggplot2
https://erocoar.github.io/ggpol/
Other
104 stars 10 forks source link

remove outliers without filtering out #11

Closed akhst7 closed 2 years ago

akhst7 commented 3 years ago

I'd like to remove outliers from a box jitter plot. I tried outlier.color =NA, outlier.alpla=0, and outlier.fill=NA but none of these alone or in comb did not work. Is there a way to remove outliners from the box jitter plot without manipulating the original df in question ?

Thanks.

erocoar commented 3 years ago

Hi, thanks for pointing out this issue. Could you share some data to reproduce the problem? For me, setting outlier.color = NA seems to work, but it might also depend on the shape you're using

akhst7 commented 3 years ago

Hi Frederick,

I tried with or without Jitter.shjape but I am still getting out line points.

If I do;

> ggplot(tmp, aes(x =Cluster, y = mean.scaled.GlcCer.total)) +
+ geom_boxjitter( jitter.color = NA, outlier.color = "black, errorbar.draw = TRUE, errorbar.length = 0.2, notch = T) 

I do see only outlier dots, but If I do the opposite;

> ggplot(tmp, aes(x =Cluster, y = mean.scaled.GlcCer.total)) +
+ geom_boxjitter( jitter.color = "black", outlier.color = NA, errorbar.draw = TRUE, errorbar.length = 0.2, notch = T) 

I still see the outliers.

Attached is the data file in question.

Thanks for helping.

On Mar 6, 2021, at 7:22 AM, Frederik Tiedemann notifications@github.com wrote:

Hi, thanks for pointing out this issue. Could you share some data to reproduce the problem? For me, setting outlier.color = NA seems to work, but it might also depend on the shape you're using

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/erocoar/ggpol/issues/11#issuecomment-791928198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXO5VZBZNVZJE7SFLBPLJTTCINCBANCNFSM4YNEXRKA.