0

I have the following code I used to produce graphs. I used scale_x_continuous instead of scale_x_log10 because I was having the same error described in this post. However, when I do that, my x-axis titles disappear and are replaced by log-10. How do I fix this?

```{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. Does using print screen not work? What are some suggestions for posting an image from R onto Stackoverflow? (apart from uploading online to an image provider"

Harsh
  • 1
  • 1
  • 1
    Without a [minimal reproducible data set](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) it's difficult to know what's happening, but can you try transforming the data first then plotting that new column? – Phil Jun 16 '17 at 13:03
  • Can you just use ```+ xlab("my label")``` ? – rsmith54 Jun 16 '17 at 14:47
  • The xlab function does not work. I will try and work on a reproducible dataset! – Harsh Jun 18 '17 at 14:43

0 Answers0