Hi - I have a dataframe with 4 variables - long, lat, temp and year. I would like to plot temperature by lat and long in contour plots by year. There are 391 data points. When I try
contourplot(temp~long*lat|year,data=hake,cuts=10,labels = TRUE,contour = TRUE,pretty = TRUE,region=TRUE) I get plots with dots around by data, but not contour lines or filled in regions. I have also used the intrep function with image and contour which works fine, but I have to subset by data by year first before I make the graphs. I tried to use grid<-expand.grid(x=x,y=y) after reading some other questions on Nabble about using contourplot with irregular data points. When I run the contourplot contourplot(z~x*y|hake$year,data=grid,cuts=10,labels = TRUE,contour = TRUE,pretty = TRUE,region=TRUE) I get an error message in the plot: Error using packet 4 no proper 'z' matrix specified. I tried to use expand.grid(x=x,y=y,z=z), but get an error message that R cannot allocate vector of size 3.1 Gb. Any help would be appreciated. Thanks Sally Roman Fishery Technician University of Massachusetts Dartmouth, School for Marine Science and Technology Fairhaven, MA 02917 -- View this message in context: http://r.789695.n4.nabble.com/contourplot-by-year-tp2284818p2284818.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@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.