R中的Log10_trans函数删除轴标题

时间:2017-06-16 12:33:16

标签: r ggplot2

我有以下用于生成图形的代码。我使用scale_x_continuous而不是scale_x_log10,因为我遇到this post中描述的相同错误。但是,当我这样做时,我的x轴标题消失并被log-10取代。我该如何解决这个问题?

```{r echo=FALSE, Univariate_Plots}
grid.arrange(ggplot(data = prw,
                    aes(x = fixed.acidity)) + 
               geom_histogram(binwidth = .2) +
               scale_x_continuous(log10_trans(), limits = c(0, 20)),

ggplot(data = prw,
       aes(x = volatile.acidity)) +
  geom_histogram(binwidth = .03) +
  scale_x_continuous(log10_trans(), limits = c(0, 1.5)),

ggplot(data = prw,
       aes(x = citric.acid)) +
  geom_histogram(binwidth = .05) +
  scale_x_continuous(log10_trans(), limits = c(0,1)),

ggplot(data = prw,
       aes(x = free.sulfur.dioxide)) +
  geom_histogram(binwidth = .075) +
  scale_x_log10(),

ggplot(data = prw,
       aes(x = total.sulfur.dioxide)) +
  geom_histogram(binwidth = 3) +
  scale_x_continuous(log10_trans(), limits = c(0, 120)),

ggplot(data = prw,
       aes(x = sulphates)) +
  geom_histogram(binwidth = .05) +
  scale_x_continuous(log10_trans(), limits = c(0,2)),
ncol = 3)
```

P.S。使用打印屏幕不起作用吗?将图像从R发布到Stackoverflow有哪些建议? (除了在线上传到图像提供商“

0 个答案:

没有答案