ggplot2
在运行时会生成漂亮的彩色条形图。但是,当我尝试将其编织为word或HTML时,它会以黑白显示图形。我想它需要稍作调整,也许有人可以提供帮助。 loan_status是一个因子变量。
我使用的代码如下:
ggplot(clean_data2[,c("loan_status","Client_gender")],
aes(x=Client_gender,color=loan_status,fill=loan_status))+
geom_bar() +
ggtitle("Client_gender")+
theme(plot.title = element_text(hjust = 0.5),
axis.text.x=element_text(angle=60, hjust=1))