简体   繁体   中英

How to manage the histogram of an `rcauchy()` in R?

rcauchy() is a fairly bad-behaving distribution whose histogram visualization is difficult.

I was wondering how I could improve the histogram presentation of rcauchy() below?

More specifically, is there a way I could show 80% or 90% of the entire distribution in the histogram?

x = rcauchy(5e4)

hist(x)

If you only want to plot the middle of your distribution, just subset your sample.

cuts <- quantile(x, c(.1,.9))
hist(x[x>=cuts[1] & x<=cuts[2]])

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM