简体   繁体   English

R中堆积的带状图被截断了吗?

[英]Stacked stripchart in R getting cut off?

I am trying to create a dotplot for some sampling distributions. 我正在尝试为一些采样分布创建点图。 I have created one for the medians of random samples of a uniform distribution. 我为均匀分布的随机样本的中位数创建了一个。 However the chart is getting truncated erroneously at the top. 但是,图表在顶部被错误地截断了。 I have tried to reset with a ylim vector to no avail. 我试图用ylim向量进行重置无济于事。

B <- replicate(500,median(sample(c(0:9),20,replace=T)))
stripchart(B, method="stack",pch=16,offset =0.5,at=0)

dotplot 点图

Any suggestions? 有什么建议么?

I could not make it work using stripchart and I don't know why. 我无法使用stripchart使它正常工作,我也不知道为什么。 I hope barplot delivers what you need: 我希望barplot满足您的需求:

barplot(table(B))

Hopefully you can work with that. 希望您可以与之合作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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