我正在生成一个 ecdf 图并想为其添加一个图例,但出现以下错误:
plot(xlim=c(0,100), ylim=c(0,1), main=NULL, xaxs="i", yaxs="i",
ecdf(PrecentageVector1), col="red", do.p = FALSE, pch=19,
lwd=3, legend("bottomleft",c("A","B","C")), panel.first = grid())
Error in strwidth(legend, units = "user", cex = cex, font = text.font) :
invalid graphics state
可能是什么问题呢?