箭头

2017-03-06 139 views
1

我想情节之间直接上R的图片添加一些箭头状,箭头地块之间:箭头

enter image description here

到目前为止,我只有用下面的代码的故事情节,但我无法弄清楚如何添加箭头

# devtools::install_github("franciscorichter/dmea") 
library(dmea) 

s = sim_phyl() 
par(mfrow=(c(1,2))) # 1 row but 2 plot panels 
color = 'darkgreen' 
plot(s$newick,direction = 'upwards',show.tip.label=FALSE,edge.width=5,edge.color = color,type="fan", no.margin = TRUE) 
dropex <- drop.fossil(s$newick) 
plot(dropex,direction = 'upwards',show.tip.label=FALSE,edge.width=5,edge.color = color,type="fan", no.margin = TRUE) 
+2

我想你可以打开** 3个**积板,以及箭头只是中间的一个 –

回答

0

下面是使用par(mfrow=)) 3列做到这一点。如果你想有更多的控制权,列宽的一种方法,可以考虑使用layout代替par(mfrow=))

par(mfrow=(c(1,3))) # 1 row but 3 plot panels 
plot(1:10, yaxt="n",ylab="") 
plot(1:10,type="n", yaxt="n",xaxt="n",xlab="", ylab="", bty="n") 
arrows(x0=10, y0=7, x1 = 1, y1 = 7) 
arrows(x0=1, y0=3, x1 = 10, y1 = 3) 
plot(10:1, yaxt="n",ylab="") 

enter image description here