world                 package:fields                 R Documentation

_P_l_o_t _o_f _t_h_e _w_o_r_l_d

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

     Plots quickly, medium resolution outlines of large land masses and
      bodies of water.

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

     world(ylim = c(-90, 90), xlim = NULL, add = FALSE, asp = 1,
                      xlab = "", ylab = "", xaxt = "n", yaxt = "n", eps =
                      0.1, col=1,shift = FALSE, 
                      fill=FALSE, col.water="white", col.land="darkgrey", ...)

     world.color(xlim= c(-180,180), ylim=c(-90,90), 
                  col.water="white",col.land="darkgrey", ... )

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

    ylim: range of latitudes

    xlim: range of longitudes

     add: logical; if true will add the world map to current plot.

     asp: aspect ratio used if 'add' is false, see 'plot.default'.

xlab,ylab: labels for x- and y-axis; empty by default.

xaxt,yaxt: axis type for x- and y-axis; empty by default.

     eps: Tolerance to decide when to insert line break about 0 if map
          is to be shifted. (leave this at .1) 

   shift: If TRUE shifts to be centered on the Dateline and  longitude
          runs from 0 to 360. If FALSE centers on Prime Meridian and 
          longitude runs  from -180 to 180.

     col: Color for map lines when fill is FALSE.

    fill: If FALSE draws land outlines. If TRUE fills in land and water
          with different colors.

col.land: Color for land filling.

col.water: Color for water filling.

     ...: If the land is not filled these are graphical arguments that
          are passed to the 'lines' (and 'plot' if 'add' is false)
          function that draws the outline.

     If fill is TRUE then these arguments are passed to the polygon
     function that does the filling.

_D_e_t_a_i_l_s:

     Both functions use the FIELDS dataset world.dat for the
     coordinates. The  main advantage of this function is that it is
     fast and easy to modify.  The shift option to center over the
     dateline is useful because often  plots of oceanic and atmospheric
     information center the map this way. 

     The function 'world.color' can be used separately but is also
     called by world with fill being TRUE. When used alone it will just
     add the colored landmasses and water to an existing plot. It is
     easy to modify just to add the land masses and use the existing
     back ground color as water.  Unfortunately world.color will not
     work when shift is TRUE.  The current code could be modified if
     you need this option.  Thanks to Steve McIntyre for suggesting and
     testin the fill option.

_S_e_e _A_l_s_o:

     US

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

     world()
     # add the US
     US( add=TRUE,col="blue")

     world( fill=TRUE) # land filled in dark grey 

     ## Western Europe (*which* big islands are missing?)
     ## with a coordinate grid:

     world(xlim=c(-10,18),ylim=c(36,60), 
         xaxt = "s", yaxt = "s", fill=TRUE, col.land="darkgreen")

     box() # add back in the box that was obscured by the ocean fill.

     # add back in outline of land.
     world( add=TRUE,lwd=1.5, col="green")

     grid()

