一个图中的多行绘图 - 如何自动调整x-和y轴以找到所有图形
从我以前的问题下关注 R:从数据框中选择向量(数字),样本n = 10个大小i = 5的子集,i = 5和i = 10的向量,并计算这些样品中的每个样本
我想绘制结果2个向量的分布。我正在使用epdfplot创建一个密度,然后将其添加到图中的第二个密度,但是,我有一个问题:Xlim和Ylim被调整为Graph i首先绘制的图形,但添加了图形。
epdfPlot(as.numeric(unlist(vector1)),
curve.fill = TRUE,
curve.fill.col = rgb(1, 0, 0, alpha = 0.5),
epdf.col = "red",
)
epdfPlot(as.numeric(unlist(IRR_mean_diversified)),
curve.fill = TRUE,
curve.fill.col = rgb(0, 0, 1, alpha = 0.5),
epdf.col = "blue",
add = TRUE)
但是,我尝试使用值的最小/最大函数来截断图形。
谢谢你!
Following from my previous question here
R: Select vector (numeric) from data frame, sample n=10 subsets of size i=5 and i= 10 within vector and calculate mean for each of these samples
I want to plot the distribution of the resulting 2 vectors. I am using epdfPlot to create one density and then the second one adding it to the plot, however, I have the problem that the xlim and ylim are adjusted for graph I plot first but not for the graph(s) added.
epdfPlot(as.numeric(unlist(vector1)),
curve.fill = TRUE,
curve.fill.col = rgb(1, 0, 0, alpha = 0.5),
epdf.col = "red",
)
epdfPlot(as.numeric(unlist(IRR_mean_diversified)),
curve.fill = TRUE,
curve.fill.col = rgb(0, 0, 1, alpha = 0.5),
epdf.col = "blue",
add = TRUE)
I tried with min/max function of the values, however, that truncates the graphs.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论