title: X-axis log-scale conversion ggplot2
body: <p>I have created a chart in ggplot2 using data from the gapminder package in RStudio. I am curious how to convert the horizontal axis to log scale. I did use the function scale_x_continuous but after running the code the graph disappears. </p>
  
  <pre><code>ggplot(data = gapminder07) + geom_point(mapping = aes(x = gdpPercap, y = lifeExp))
  p &lt;- ggplot(gapminder07, aes(x = gdpPercap, y=lifeExp, label = country))
  p + geom_text()
  p + scale_x_continuous(trans = 'log10')
  </code></pre>
  
  <p>Edit* The same issue occurs when adding a fitted line. The line appears but the data points disappear. </p>
  
  <pre><code>ggplot(data = gapminder07) + geom_point(mapping = aes(x = gdpPercap, y = lifeExp))
  p &lt;- ggplot(gapminder07, aes(x = gdpPercap, y=lifeExp, label = country))
  p + geom_text()
  p + geom_smooth()
  </code></pre>