gpt4 book ai didi

r - 我的图表的标题重叠。我怎样才能解决这个问题?

转载 作者:行者123 更新时间:2023-12-04 09:57:34 26 4
gpt4 key购买 nike

所以我正在绘制这段代码,但文本是重叠的。我怎样才能解决这个问题?
enter image description here

mayors <- read.csv("https://raw.githubusercontent.com/umbertomig/intro-prob-stat-FGV/master/datasets/brmayors.csv")
head(mayors)

mosaicplot(table(mayors$SIGLA_PARTIDO, mayors$DESCRICAO_SEXO), main = "Gender by party", color = "turquoise")

mosaicplot(table(mayors$SIGLA_PARTIDO, mayors$DESCRICAO_GRAU_INSTRUCAO), main = "Level of education by party", color = "plum")

enter image description here

最佳答案

您可以使用 las = 控制轴标签的方向.您还可以使用 cex.axis = 控制文本的大小。 .

mosaicplot(table(mayors$SIGLA_PARTIDO, mayors$DESCRICAO_GRAU_INSTRUCAO),
main = "Level of education by party",
color = "plum",
las = 2,
cex.axis = 0.5)

enter image description here

关于r - 我的图表的标题重叠。我怎样才能解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61893515/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com