Re: [R] how to plot image() without painting a map (the background)

From: Ptit_Bleu <ptit_bleu_at_yahoo.fr>
Date: Tue, 04 Mar 2008 07:15:41 -0800 (PST)

Hi,

Thanks to ggplot2 (and to Hadley Wickham) I managed to plot some nice graphs (not as fast as in a movie but it is ok). One thing I am still looking for is a way to add the values on the contour lines (like with the contour function).

I read the stat.contour help page but I haven't found my case.

Is it possible to do it or not ?

Thanks for your help.
Ptit Bleu.



An example of code (99,99% written by Hadley - the errors come from me) with the essai1.txt file :
http://www.nabble.com/file/p15829412/essai1.txt essai1.txt

library(ggplot2)
library(maps)

setwd("C:/gfs/")

lonlat1<-read.table("essai1.txt", sep=",", header=T) names(lonlat1)<-c("longitude", "latitude", "DSWRF", "x")

france <- as.data.frame(map('france', plot=F)[c("x", "y")]) france_map <- geom_path(aes(x=x, y=y, fill=NULL), data=france)

p <- qplot(data=lonlat1, longitude, latitude, geom="tile", fill=DSWRF, xlab="", ylab="") +
geom_contour(aes(z = DSWRF), size=1, colour="red") + france_map

p

-- 
View this message in context: http://www.nabble.com/how-to-plot-image%28%29-without-painting-a-map-%28the-background%29-tp15546906p15829412.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Tue 04 Mar 2008 - 15:41:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Mar 2008 - 16:30:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive