[英]Change the smoothness on a volcano plot
我已经绘制了一个火山图,但是基础数据存在差距,即直方图数据如下所示:
当我制作火山图时,看起来有点傻:
是否可以在阴影区域应用平滑剂以熨平棱纹特征? 当然,它必须已经具有与之关联的平滑度,否则阴影每次都会降回到0?
码:
ggplot(fly2[fly2$Region == "different",], aes(x = Probability)) +
stat_density(aes(ymax = ..density.., ymin = -..density..),
fill = "grey50", colour = "grey50",
geom = "ribbon", position = "identity") +
facet_grid(. ~ Algorithm) + xlim(0,0.3) +
coord_flip()
链接到dput文件:
http://pastebin.com/ba95WEab
使用adjust
的geom_density
。
例如,当我使用adjust = 1.6
,这就是我得到的
ggplot(fly2[fly2$Region == "different",], aes(x = Probability)) +
stat_density(aes(ymax = ..density.., ymin = -..density..),
fill = "grey50", colour = "grey50",
geom = "ribbon", position = "identity",
adjust=1.6) +
facet_grid(. ~ Algorithm) + xlim(0,0.3) +
coord_flip()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.