Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何为每个多重打印添加标签?_R_Ggplot2_Plot_Label_Legend - Fatal编程技术网

R 如何为每个多重打印添加标签?

R 如何为每个多重打印添加标签?,r,ggplot2,plot,label,legend,R,Ggplot2,Plot,Label,Legend,如何为每个多重绘图添加标签或图例?请参阅我在上一篇文章中的答案@dc37 scale\u x\u CONTINUAL中的错误(中断=1:12):找不到函数“scale\u x\u CONTINUAL”CONTINUAL,我正在编辑我的code@dc37天哪,非常感谢,它现在起作用了!!很高兴听到,验证另一篇文章()并关闭这篇文章(这是你上一篇文章的副本)。此外,请参阅此文档,在您之前的帖子@dc37中查看我的答案缩放x连续错误(中断=1:12):无法找到函数“缩放x连续”连续,我正在编辑我的co


如何为每个多重绘图添加标签或图例?

请参阅我在上一篇文章中的答案@dc37 scale\u x\u CONTINUAL中的错误(中断=1:12):找不到函数“scale\u x\u CONTINUAL”
CONTINUAL
,我正在编辑我的code@dc37天哪,非常感谢,它现在起作用了!!很高兴听到,验证另一篇文章()并关闭这篇文章(这是你上一篇文章的副本)。此外,请参阅此文档,在您之前的帖子@dc37中查看我的答案缩放x连续错误(中断=1:12):无法找到函数“缩放x连续”
连续,我正在编辑我的code@dc37天哪,非常感谢,它现在起作用了!!很高兴听到,验证另一篇文章()并关闭这篇文章(这是你上一篇文章的副本)。另外,请参阅此文档
p = ggplot() + 
  geom_line(data = Month_time, aes(x = Month, y = CarrierDelay), color = "red") +
  geom_line(data = Month_time, aes(x = Month, y = WeatherDelay), color = "purple") +
  geom_line(data = Month_time, aes(x = Month, y = NASDelay), color = "yellow") +
  geom_line(data = Month_time, aes(x = Month, y = SecurityDelay), color = "green") +
  geom_line(data = Month_time, aes(x = Month, y = LateAircraftDelay), color = "blue") +
  xlab('Month') +
  ylab('Delay Types [min]')
print(p)