Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread Jim Lemon
On 06/16/2013 04:14 AM, Birdada Simret wrote: Thank you. @David: The example is exactly this: time <- seq(0,72,6) music <- c(0.05,0.18,0.25,0.31,0.32,0.34,0.35, 0.36,0.37,0.38,0.39,0.40,0.41) actor <- c(0,1000,2000,3000,4000,5000,6000,7000,8000,9000,1,11000,12000) par(mar=c(5, 4, 4, 4) + 0.1)

Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread David Winsemius
On Jun 15, 2013, at 11:14 AM, Birdada Simret wrote: > Thank you. > @David: The example is exactly this: > time <- seq(0,72,6) > music <- c(0.05,0.18,0.25,0.31,0.32,0.34,0.35, > 0.36,0.37,0.38,0.39,0.40,0.41) > actor <- c(0,1000,2000,3000,4000,5000,6000,7000,8000,9000,1,11000,12000) > par(mar=

Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread Birdada Simret
Thank you. @David: The example is exactly this: time <- seq(0,72,6) music <- c(0.05,0.18,0.25,0.31,0.32,0.34,0.35, 0.36,0.37,0.38,0.39,0.40,0.41) actor <- c(0,1000,2000,3000,4000,5000,6000,7000,8000,9000,1,11000,12000) par(mar=c(5, 4, 4, 4) + 0.1) plot(time, music, pch=16, axes=F, ylim=c(0,1),

Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread arun
Hi, You could use ?twoord.plot() from library(plotrix): library(plotrix) dat2<- data.frame(month,music,actor) dat2$month<- factor(month,labels=c(month.abb,"Pag")) dat2New<-dat2[order(dat2$month),]  with(dat2New,twoord.plot(month,music,actor,     lylim=c(0,1),rylim=c(0,13000)

Re: [R] Plotting two y-axis vs non-numeric x-axis

2013-06-15 Thread David Winsemius
On Jun 15, 2013, at 5:18 AM, Birdada Simret wrote: > Hi dear all, the following code is correct. but I want to use non-numeric > x-axis, for example > if I replace time <- seq(0,72,6) by > month <- > c("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Pag") > > Ofcourse