R vcd::mosaic overlapping labels

大憨熊 提交于 2019-12-06 07:25:10

Finally found it! Key searching docs:

?labelings
?labeling_border

In order to rotate the labels

mosaic(y ~ x, 
       data= a, 
       labeling= labeling_border(rot_labels = c(90,0,0,0), 
                                 just_labels = c("left", 
                                                 "center", 
                                                 "center", 
                                                 "center")))

Try this:

+ theme(axis.text.x=element_text(angle=-25, hjust= .1))

it will rotate labels for 25 degrees (you can just copy and paste)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!