On 2011-04-11 05:38, ogbos okike wrote:> Dear List,
> Following the link below (
> http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=plotrix:clock24.plot) I got
an
> interesting polar plots which displayed my data and the time of
observation.
> Thank you very much for providing such details.
>
> However, I have two set of data which I wish to display in the same polar
> plot. I tried using points to add the second data but could not succeed.
>
> That is, after the running the first code:
>
> clock24.plot(a,b,main="Test Clock24 (lines)",show.grid=FALSE,
> line.col="green",lwd=3)
> if(dev.interactive()) par(ask=TRUE)
> # now do a 'daylight' plot
> clock24.plot(a,b,
> main="Test Clock24 daytime (symbols)",
> point.col="blue",rp.type="s",lwd=3)
> # reset the margins
> par(mar=c(5,4,4,2))
>
> I tried to add the second using:
> points(aa,bb,col="blue")
> Error in xy.coords(x, y) :
> (list) object cannot be coerced to type 'double'
>> points(add = TRUE,a,b,col="blue")
> Error in xy.coords(x, y) :
> (list) object cannot be coerced to type 'double'
Have you made sure that your points fit on the display?
The following works for me (note: I'm using Jim Lemon's
well-known penchant for eschewing the spacebar):
testlen<-rnorm(24)*2+5
testpos<-0:23+rnorm(24)/4
clock24.plot(testlen,testpos,show.grid=FALSE,line.col=3)
clock24.plot(testlen[7:19],testpos[7:19],point.col=4,rp.type="s",point.symbol=16,cex=3,add=TRUE)
par('usr')
#[1] -8.786689 8.786689 -8.786689 8.786689
points(3,4,pch=19,col=2,cex=3)
Peter Ehlers
>
> Any further help will be much appreciated.
>
> Best regards
> Ogbos
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.