[R] help with image function

Jonas Öster oster16 at gmail.com
Wed Oct 24 12:01:09 CEST 2007


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 


More information about the R-help mailing list