plotField             package:clim.pact             R Documentation

_p_l_o_t_F_i_e_l_d

_D_e_s_c_r_i_p_t_i_o_n:

     Produce 2D plots like maps and Hovmuller diagrams. A poor man's
     version of Ferret's <URL: http://ferret.wrc.noaa.gov/Ferret/> plot
     function. `plot.field' is a high level command that utilises
     `mapField' or `grd.box.ts' whenever appropriate.

_U_s_a_g_e:

     plotField(x,lon=NULL,lat=NULL,tim=NULL,mon=NULL,val.rng=NULL,
                            col="black",col.coast="grey",lty=1,lwd=1,what="ano")

_A_r_g_u_m_e_n_t_s:

       x: A field object.

     lon: Position for longitude. One of `lon, lat, tim' must be set.

     lat: Position for latitude.

     tim: Position for time as time index (1:length(tim).

     mon: Month to extract.

 val.rng: Valid range: interval used for colour scale.

     col: Contour line colour for levels.

col.coast: Contour line colour for coast lines.

     lty: Contour line type.

     lwd: Contour line width.

    what: Choose between "ano" - anomaly; "abs" absolute; "cli"
          climatological.

_V_a_l_u_e:

_A_u_t_h_o_r(_s):

     R.E. Benestad

_E_x_a_m_p_l_e_s:

     skt <- retrieve.nc("skt.mon.mean.nc",x.rng=c(-90,50),y.rng=c(0,75))

     # Maps of monthly mean skin temperatures:
     plotField(skt,tim=1,val.rng=c(-20,20))
     dev2bitmap("ncep.skt_194801.jpg",type="jpeg")

     plotField(skt,tim=100,col="blue",col.coast="darkgreen",val.rng=c(-10,10))

     # For adding extra points/contours:

         # From filled.contour in base
         mar.orig <- (par.orig <- par(c("mar","las","mfrow")))$mar
         on.exit(par(par.orig))

         w <- (3 + mar.orig[2]) * par('csi') * 2.54
         layout(matrix(c(2, 1), nc=2), widths=c(1, lcm(w)))

         par(las = 1)
         mar <- mar.orig
         mar[4] <- 1
         par(mar=mar)
     # End of section affecting the window set up.

     points(0,50,pch=21,col="red")
     grid()
     dev2bitmap("ncep.skt_195604.jpg",type="jpeg")

     # A hovmuller diagram:
     plotField(skt,lon=0,val.rng=c(-10,10))
     dev2bitmap("ncep.skt_lontim.jpg",type="jpeg")

     # A single time series:
     plotField(skt,lon=-20,lat=50)

