k1 %>%
ggplot(aes(Alert,Sum, fill = Alert)) +
geom_bar(stat = "identity") +
facet_wrap(~ Model , nrow= 5) +
coord_flip() +
geom_text(aes(label = Sum), fontface = "bold") +
theme(legend.position = "none")+
ggtitle("MODEL WISE ALERT COUNT")+
theme_grey(base_size = 22)+
theme(legend.position = "top")
我找到了答案。
k1 %>%
ggplot(aes(Alert,Sum, fill = Alert)) +
geom_bar(stat = "identity") +
facet_wrap(~ Model , nrow= 5) +
coord_flip() +
geom_text(aes(label = Sum), fontface = "bold") +
ggtitle("MODEL WISE ALERT COUNT")+
theme_grey(base_size = 22)+
theme(legend.position = "bottom") +
guides(fill=guide_legend(nrow=2,byrow=TRUE))