0

I'm new to coding and can't find an answer to my question online. I need to plot a graph with 2 lines with a log scale to bring the 2 data sets closer together. I have worked out the code for the 2 lines but cant make it work with a log scale, please help :)

ggplot(df, aes(x= df$Date)) + 
  +     geom_line(aes(y = df$SearchVolume, colour = "Search Volume")) + 
  +     geom_line(aes(y = df$People, colour = "People")) 

The y axis needs to become log if that is possible

J_F
  • 9,956
  • 2
  • 31
  • 55
  • http://docs.ggplot2.org/current/scale_continuous.html says `+ scale_y_log10()` – J_F Mar 15 '17 at 13:29
  • Welcome to SO. Please hover over the R tag - it asks for a a) minimal & b) reproducible example, with which one can recreate your problem using copy,paste,run. See [this GIF](http://giphy.com/embed/3og0IEmawWtqcdLRug) and [this guide](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example#answer-5963610). Also look at the R help files (e.g. `?geom_line`, _examples_ section). After that, you may want to edit & improve your question accordingly. Specifying required libraries, example data etc makes it easier for all to follow and participate without guesswork. – lukeA Mar 15 '17 at 13:32
  • Please review this [How to create a Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve) – Neo Mar 15 '17 at 14:23

0 Answers0