[R] Odp: help with image function
Petr PIKAL
petr.pikal at precheza.cz
Wed Oct 24 12:33:56 CEST 2007
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 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
I 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 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()
> [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 guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list