Hallo! Have succeded in creating an image plot using image() Have failed to provide explanation to what the colors means in terms of values/numbers (i.e. the height of the staples that the colors represent). Wonder if anyone have any help to offer in this matter? Have tried with convertColor() and palette() without succes. I attach the code below and the output in an attached pdf Thanks a lot /Jonas (University of Uppsala, Sweden) #//Plot18 3D-image containing above diurnal distr plots filename = sprintf("%s18%s3Dimage.pdf", output, sn) main = sprintf("Diurnal Distr of Whistlers Divided into Months \n %s %s", station, period) sub = sprintf("LT=Local Time, GMT=Greenwich Mean Time \n No consideration taken for days when receiver did not operate") breaks = c(1,5,10,50,100,500,1000,5000,10000,50000,100000) pdf(filename) #recording to .pdf image(z=z, x=1:13, y=0:24, col= heat.colors(10), breaks=breaks, main=main, xlab="", ylab="", sub=sub, axes=FALSE) grid(nx=12, ny=24, col="black") axis(side=2, labels=lclockmarks, at=clockmarks, line=0) mtext(text="LT", side=2, line=1, at=-2) axis(side=2, labels=clockmarks, at=clockmarks, line=2, tick=FALSE) mtext(text="GMT", side=2, line=3, at=-2) axis(side=1, labels=labels, at=at, line=-1, tick=FALSE) dev.off() -------------- next part -------------- A non-text attachment was scrubbed... Name: 18TH3Dimage.pdf Type: application/pdf Size: 17054 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/r-help/attachments/20071024/d9bcf975/attachment.pdf
Hi r-help-bounces at r-project.org napsal dne 24.10.2007 12:01:09:> Hallo! > Have succeded in creating an image plot using image() > Have failed to provide explanation to what the colors means in terms of > values/numbers (i.e. the height of the staples that the colorsrepresent).> Wonder if anyone have any help to offer in this matter? Have tried with > convertColor() and palette() without succes. > I attach the code below and the output in an attached pdfI am not completely sure but the colours shall represent values of "z" which are between coresponding break values. So from yellow to red you the values are increasing. You can test it if you expand 1:13 and 0:24 and put "z" values into your picture by text(x, y, z) Regards Petr> > Thanks a lot /Jonas (University of Uppsala, Sweden) > > > #//Plot18 3D-image containing above diurnal distr plots > filename = sprintf("%s18%s3Dimage.pdf", output, sn) > main = sprintf("Diurnal Distr of Whistlers Divided into Months \n %s%s",> station, period) > sub = sprintf("LT=Local Time, GMT=Greenwich Mean Time \n Noconsideration> taken for days when receiver did not operate") > breaks = c(1,5,10,50,100,500,1000,5000,10000,50000,100000) > pdf(filename) #recording to .pdf > image(z=z, x=1:13, y=0:24, col= heat.colors(10), breaks=breaks,main=main,> xlab="", ylab="", sub=sub, axes=FALSE) > grid(nx=12, ny=24, col="black") > axis(side=2, labels=lclockmarks, at=clockmarks, line=0) > mtext(text="LT", side=2, line=1, at=-2) > axis(side=2, labels=clockmarks, at=clockmarks, line=2, tick=FALSE) > mtext(text="GMT", side=2, line=3, at=-2) > axis(side=1, labels=labels, at=at, line=-1, tick=FALSE) > dev.off() > [p??loha 18TH3Dimage.pdf odstran?na u?ivatelem Petr PIKAL/CTCAP] > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
The Disney way: par(mar=c(2,8,2,2)) barplot(rep(1,10), axes=FALSE, names=rev(paste(breaks[1:10], breaks[2:11], sep="-")), horiz=TRUE, col=heat.colors(10), las=2) ________________________________ From: r-help-bounces at r-project.org on behalf of Petr PIKAL Sent: Wed 24/10/2007 11:33 AM To: Jonas ?ster Cc: r-help at r-project.org Subject: [R] Odp: help with image function Hi r-help-bounces at r-project.org napsal dne 24.10.2007 12:01:09:> Hallo! > Have succeded in creating an image plot using image() > Have failed to provide explanation to what the colors means in terms of > values/numbers (i.e. the height of the staples that the colorsrepresent).> Wonder if anyone have any help to offer in this matter? Have tried with > convertColor() and palette() without succes. > I attach the code below and the output in an attached pdfI am not completely sure but the colours shall represent values of "z" which are between coresponding break values. So from yellow to red you the values are increasing. You can test it if you expand 1:13 and 0:24 and put "z" values into your picture by text(x, y, z) Regards Petr> > Thanks a lot /Jonas (University of Uppsala, Sweden) > > > #//Plot18 3D-image containing above diurnal distr plots > filename = sprintf("%s18%s3Dimage.pdf", output, sn) > main = sprintf("Diurnal Distr of Whistlers Divided into Months \n %s%s",> station, period) > sub = sprintf("LT=Local Time, GMT=Greenwich Mean Time \n Noconsideration> taken for days when receiver did not operate") > breaks = c(1,5,10,50,100,500,1000,5000,10000,50000,100000) > pdf(filename) #recording to .pdf > image(z=z, x=1:13, y=0:24, col= heat.colors(10), breaks=breaks,main=main,> xlab="", ylab="", sub=sub, axes=FALSE) > grid(nx=12, ny=24, col="black") > axis(side=2, labels=lclockmarks, at=clockmarks, line=0) > mtext(text="LT", side=2, line=1, at=-2) > axis(side=2, labels=clockmarks, at=clockmarks, line=2, tick=FALSE) > mtext(text="GMT", side=2, line=3, at=-2) > axis(side=1, labels=labels, at=at, line=-1, tick=FALSE) > dev.off() > [pr?loha 18TH3Dimage.pdf odstranena uzivatelem Petr PIKAL/CTCAP] > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.______________________________________________ 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.