ggplot2 Color Scale Over Affected by Outliers

后端 未结 3 1850
夕颜
夕颜 2021-02-13 23:22

I\'m having difficulty with a few outliers making the color scale useless.

My data has a Length variable that is based in a range, but will usually have a few much large

3条回答
  •  情书的邮戳
    2021-02-13 23:52

    Get rid of the outliers. Quick and dirty, I know, but I think it was worth saying. You can always describe them in your text. Why let them ruin your analyses and graphs?

    There's a paper referenced in this blog post which deals with ethically removing outliers:

    http://psuc2f.wordpress.com/2011/10/14/is-it-dishonest-or-unethical-to-remove-outliers/

    Another simple way of dealing with them would be to cap them:

    df$Value[df$Value>1300]=1300

    Again, you can describe that you did this in the text or even just edit the scale to say 1300+ instead of 1300

提交回复
热议问题