4
我只是嘗試製作折線圖並使用g中的ggplot爲其添加圖例。以下是我的代碼。使用ggplot將圖例添加到單個折線圖
ggplot(mtcars, aes(x=mpg, y=wt)) + geom_line(stat = "identity") + scale_fill_identity(name = "", guide = "legend", labels = c("myLegend"))
我繪製利用Matlab。有誰能告訴我如何在R中做到這一點?非常感謝!!