且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在ggplot中创建多列图例

更新时间:2023-11-24 09:31:16

您必须将指南分配给正确的审美,并使用填充:

you must assign the guide to the correct aesthetic and you used fill:

guides(fill=guide_legend(ncol=2))

应该使用geom_bar

And you should take care of the warning with geom_bar