我正在使用R绘制图表及其图例但我在绘制带边框的图例时发现了一些问题。
plot.new()
legend(x=0, y=.15, c("Some Text"), cex=1, pt.cex =1.4, col=c("green"),
bty="n", fill="green", pch=c(15, 15, 15, 17), border="black")
边框没有完全包围绿框。我该如何解决这个问题?
答案 0 :(得分:1)
legend()
和fill="green"
之间pch=c(15, 15, 15, 17)
来电之间存在冲突。如果我放弃后者,我会得到我认为你在寻找的东西:
plot.new()
legend(x=0,y=.15, c("Some Text"), cex=1,pt.cex =1.4,col=c("green"),
bty="n",fill="green", border="black")