[R] how to qplot two x-axis x1:Farenheit x2:Celsius

Jim Lemon jim at bitwrit.com.au
Wed Sep 12 11:11:36 CEST 2012


On 09/12/2012 09:29 AM, Jonas Stein wrote:
> Hi,
>
> how can i plot two different x axis in a ggplot2 qplot?
> I want to plot Farenheit and Celsius in one diagram.
> x1:Farenheit x2:Celsius
>
Hi Jason,
Here's a basic example of how to do this sort of thing.

degC<-seq(-40,120,by=20)
plot(degC,1:9)
axis(3,at=degC*1.4+32)
mtext("degF",3,line=2)

Jim




More information about the R-help mailing list