Roe, Colleen
2013-Dec-13 23:01 UTC
[R] ggplot question: how to have two y-axis guide on one plot?
I have a plot I'd like to do wherein I plot to different y data sets and want to have two different y axis's appear (perhaps one on right side and one on left). I searched R help with all the key phrases I could think of and I have three books covering ggplot but I can't find an example of doing this. It seems a natural thing to do with ggplot. Anyone out there have a small example of doing this sort of thing? Thanks. colleen [[alternative HTML version deleted]]
David Winsemius
2013-Dec-14 02:23 UTC
[R] ggplot question: how to have two y-axis guide on one plot?
On Dec 13, 2013, at 3:01 PM, Roe, Colleen wrote:> I have a plot I'd like to do wherein I plot to different y data sets and want to have two different y axis's appear (perhaps one on right side and one on left). I searched R help with all the key phrases I could think of and I have three books covering ggplot but I can't find an example of doing this. It seems a natural thing to do with ggplot. > > Anyone out there have a small example of doing this sort of thing?Here is why Hadley says it's not a feature: http://stackoverflow.com/questions/3099219/how-to-use-ggplot2-make-plot-with-2-y-axes-one-y-axis-on-the-left-and-another -- David Winsemius Alameda, CA, USA