Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R格标签箭头_R_Text_Layer_Lattice - Fatal编程技术网

R格标签箭头

R格标签箭头,r,text,layer,lattice,R,Text,Layer,Lattice,我试图在一个类似下图的图中标记箭头。我更希望能够将它们移动到我喜欢的地方,因为在我的实际情节中,《箭侠》将被扩展。有没有办法在panel.arrows或其他面板中标记箭头 require(latticeExtra) x<- 1:19 y<- 19:1 zeros <- (1:19)*0 plt <- xyplot(x~y) plt <- plt + layer(panel.arrows(zeros,zeros,x,y,length=.1,col=1:19)) plt

我试图在一个类似下图的图中标记箭头。我更希望能够将它们移动到我喜欢的地方,因为在我的实际情节中,《箭侠》将被扩展。有没有办法在panel.arrows或其他面板中标记箭头

require(latticeExtra)
x<- 1:19
y<- 19:1
zeros <- (1:19)*0
plt <- xyplot(x~y)
plt <- plt + layer(panel.arrows(zeros,zeros,x,y,length=.1,col=1:19))
plt
require(latticeExtra)

你所说的标签是什么意思?您需要提供更多细节和更好的示例。如中所示,如果我有一些箭头的变量名向量,如何为箭头创建图例或将其名称放在绘图上的箭头旁边。请查看
text
panel.text
 plt <- plt+layer(panel.text(x=x+0.5, y=y, letters[1:19]) )
 png("labels.png")
 print(plt)
 dev.off()