[英]Base Plotting Systems : legend color
我试图在我的情节上放置一个图例标签,但由于某种原因,颜色没有出现。 这是它的外观:
plot(x=plot1$t,y=plot1$q,col ="red",xlab = 't',ylab = 'q(t)',pch =20,cex=0.5,type = 'p')
points(x=plot2$t,y=plot2$q,pch=20,col = "blue",cex=0.1)
points(x=plot3$t,y=plot3$q,pch =20, col = "purple",cex=0.1)
legend("topleft",legend=c("\u0394 t = 0.1", "\u0394 t = 0.01", "\u0394 t = 0.001"),col = c("red","blue","purple"))
这是情节的样子:
参数的名称不是col
。 你需要
text.col = c("red","blue","purple")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.