Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法type = "b"在我的图例中获得线型?
type = "b"
我希望我的图例看起来与图中的点相同:
x <- c(1:3) plot(x, x, type="b") legend("bottomright", c("dinges"), cex=1.2, pch=c(21), lty=1, bty="n")
只需添加pt.bg = 'white'. 这会使点的背景颜色变白。
pt.bg = 'white'
plot(x, x, type="b") legend("bottomright", c("dinges"), cex=1.2, pch = 21,pt.bg = 'white', lty = 1, bty="n")
我正在尝试同样的任务。在调用中包含lty和参数可以完成工作。pchlegend()
lty
pch
legend()