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

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


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 : essai1.txt



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

france <-'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


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
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 Please read the posting guide before posting to the list.

list of date sections of archive