Ggplot add legend的問題,透過圖書和論文來找解法和答案更準確安心。 我們找到下列問答集和資訊懶人包

另外網站A simple example on ggplot2 legend options - Amazon AWS也說明:A simple example on ggplot2 legend options. Presets: ... plot = ggplot(data = dat) + geom_point(aes(x = gdpPercap, y = lifeExp, color = continent)) plot.

最後網站10.8 Changing the Labels in a Legend - R Graphics Cookbook則補充:library(gcookbook) # Load gcookbook for the PlantGrowth data set # The base plot pg_plot <- ggplot(PlantGrowth, aes(x = group, y = weight, fill = group)) + ...

接下來讓我們看這些論文和書籍都說些什麼吧:

除了Ggplot add legend,大家也想知道這些: