如何减少图例和窗口边缘之间的空白?

时间:2018-06-19 18:00:31

标签: r ggplot2 legend

我有此代码:

ggplot(subset(sub, paired =='1'), aes(cond, fill = corr)) +
  geom_bar(position = "fill")+
  theme_minimal()+
  xlab ('Тест') +
  ylab ('Доля ответов') +
  facet_wrap(biling_type~biling_group, 1, labeller=labeller(paired = c('1'= 'Парные', "0" = "Непарные"), biling_type = labels1, biling_group = labels2)) +
  labs(title="Парные понятия")+
  theme(strip.text = element_text(size=12), 
        axis.title.x = element_text(size=14),
        axis.text.x  = element_text(size=14),
        axis.title.y = element_text(size=14),
        axis.text.y  = element_text(size=14),
        legend.title = element_text(size=14),
        legend.text = element_text(size=14))+
  scale_y_continuous(breaks=c(0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1))+
  scale_x_discrete (labels = c("Житейский", "Научный"))+
  scale_fill_discrete(name="Правильность употребления",
                    labels=c("Правильное", "Неправильное"))

这个情节:
enter image description here

由于某些图例功能,绘图和窗口边缘之间似乎存在空白。并且标题没有完全显示。

0 个答案:

没有答案