簡體   English   中英

從圖中向下添加標簽

[英]Add the label down from the plot

使用ggplot2它為圖右側的每一行提供圖例框

是否有任何命令可以在繪圖下添加此框,如下所示:

在此處輸入圖片說明

legend.position = "bottom"就是你要找的:

ggplot(mtcars, aes(hp, mpg, col = factor(cyl))) +
  geom_line() +
  labs(col = NULL) +
  theme(legend.position = "bottom")

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM