Hi, I would like to make a contour plot using R with the following information (data at the end): x-axis= arranged according to day (from 1 to 365, labels= use months; up to 365 days in one year), y-axis= depth (labels from 0 at the top to 7 at the bottom; this is a water depth profile), and z-axis= pH. So, this would be a pH contour plot of different dates throughout a year, with pH measured at different depths (0 meter to 7 meters). I tried to use various contour plot packages, but always have trouble with y axis data that are not arranged in ascending order thus failed to make a matrix for data in the z-axis (pH). So, I used akima to make a matrix (data.interp<-interp(x,y,z,duplicate="mean")) but the results is a square matrix- Not sure if the data is correct. So, any help/suggestion would be great! An example image that I would like to make is here: http://neuer.lab.asu.edu/images/10_data/roosevelt_temp.JPG
Thanks so much! Leo Data: Day Month Depth pH 23 Jan 0 4.9 23 Jan 3 4.93 23 Jan 7 5.05 52 Feb 0 4.93 52 Feb 3 4.92 52 Feb 7 5.54 86 Mar 0 4.93 86 Mar 3 5.09 86 Mar 7 5.32 115 Apr 0 4.92 115 Apr 3 4.88 115 Apr 7 5.385 142 May 0 4.99 142 May 2 4.805 142 May 5 5.31 142 May 7 5.41 169 Jun 0 4.935 169 Jun 2 4.66 169 Jun 3 4.96 169 Jun 7 5.55 198 Jul 0 5.19 198 Jul 3 5.1 198 Jul 5 5.59 198 Jul 7 5.8 225 Aug 0 5.05 225 Aug 2 4.88 225 Aug 5 5.31 225 Aug 7 5.53 225 Sep 0 4.78 225 Sep 2 4.76 225 Sep 5 5.22 225 Sep 6 5.4 282 Oct 0 4.8 282 Oct 3 4.91 282 Oct 5 5.185 282 Oct 6 5.32 319 Nov 0 5.06 319 Nov 3 5.05 319 Nov 7 5.11 [[alternative HTML version deleted]] ______________________________________________ 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.