[R] Contour plots in R Studio

Bert Gunter gunter.berton at gene.com
Tue May 13 03:01:55 CEST 2014


Well one would expect that you might find something useful by
searching the obvious, like

?contourplot

and following the links therein.

It also seems (to me, anyway) that you have made little effort to
understand how R works, its data structures, syntax, and so forth. So
please peruse "An Introduction to R" (or one of the many R tutorials
on the web) to learn about such basics before posting further if I am
correct in this assertion.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
H. Gilbert Welch




On Mon, May 12, 2014 at 2:27 PM, Lydia Keppler <lydiakeppler at gmail.com> wrote:
> Hi all,
>
> I am using Windows 7 and R Studio version 3.0.2 (2013-09-25).
> I am relatively new to R and am trying to make a contour plot from a 3D
> data grid.
>
> I my data file has the following specifics:
>
> [1] "file Data.nc has 3 dimensions:"
> [1] "time   Size: 96"
> [1] "lat   Size: 21"
> [1] "lon   Size: 61"
> [1] "------------------------"
> [1] "file Data.nc has 2 variables:"
> [1] "double U[time,lat,lon]  Longname:U Missval:1e+30"
> [1] "double V[time,lat,lon]  Longname:V Missval:1e+30"
>
> lat and lon includes latitude and longitude values from a certain region in
> a 1°grid
> time includes different months over 8 years
>
> I would like to draw
> 1) a contourplot of the mean U (mean U of all times), at the different
> locations (x=lon, y=lat)
> 2) a contourplot of U at the different locations (x=lon, y=lat) at
> different times.
>
> I have only made contourplots with 2D data (i.e. contour (lat,lon, z) and
> am struggling a bit to find help.
>
> Any suggestions are very much appreciated.
> Cheers,
>
> Lydia
>
> --
>><((((º>
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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