\name{ProjMap}
\alias{ProjMap}
\title{
  Generate Pixel Plot Of Matrix Z
}
\description{
  Generate a pixel plot of matrix z on a specified map projection.
  This routine deals with sterepgraphic and lambert projections from the 
  mapproj package.
}
\usage{
  ProjMap(x, y, z, rotpol = c(0, 90), lonlim, latlim, projection = "", 
          parameters = NULL, orientation = NULL, mapdat = "world", xmaplim, 
          ymaplim, thin.map = 0, col = heat.colors(12), breaks, 
          na.col = "white", longrds = seq(-180, 180, by = 20), longr = "yes", 
          latgrds = seq(-80, +80, by = 20), latgr = "yes", ltygrds = 3, 
          lwdgrds = 1, con = FALSE, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{x}{
    A vector of longitudes
  }
  \item{y}{
    A vector of latitudes
  }
  \item{z}{
    A matrix
  }
  \item{rotpol}{
    Defines the coordinates of the rotated pole. Default is geographical north 
    pole (rotpol = c(0., 90.)).
  }
  \item{lonlim}{
    Defines the longitude window to be plotted. If specified the window of the 
    projection is chosen such that the entire longitude window is comprised in 
    the plot.
  }
  \item{latlim}{
    Defines the latitude window to be plotted. If specified the window of the 
    projection is chosen such that the entire longitude window is comprised in 
    the plot. 
  }
  \item{projection}{
    Either lambert or stereographic provided by mapproject(). If an empty 
    string is used, the projection used in the last application of mapproject 
    will be used. The last projection settings are stored in variable 
    .Last.projection.
  }
  \item{parameters}{
    NA
  }
  \item{orientation}{
    Is the orientation parameter of mapproject. 
  }
  \item{mapdat}{
    Is the name of the dataset from which map data is taken. Default is "world".
  }
  \item{xmaplim}{
    Defines a longitude window from which map data shall be plotted. 
    In default, all map data comprised in the area of x,y is used for plotting. 
    In some cases this does not comprise all the map data of the projection 
    window. 
  }
  \item{ymaplim}{
    Define a latitude window from which map data shall be plotted. 
    In default, all map data comprised in the area of x,y is used for plotting. 
  }
  \item{thin.map}{
    Whether to thin out details of the map (political, continental outlines). 
    thin.map = 1 means that every second point on the map is omitted. 
    thin.map = 2 means that this thinning out is applied twice, etc.
    By default thin.map = 0, which means no thinning.
  }
  \item{col}{
    Breaks the color palette and breaks to be used for the pixels.
    Length of breaks needs to be one larger than length of colors. If breaks is 
    not specified equidistant breaks from min to max are used.
  }
  \item{breaks}{
    NA
  }
  \item{na.col}{
    The color to use for pixels with NA (in image). 
    Useful values are "white" and "grey80".
  }
  \item{longrds}{
    Array of longitude circles for which grid-lines shall be plotted.
  }
  \item{longr}{
    String indicating if the longitude circles should be plotted. 
    Default is "no".
  }
  \item{latgrds}{
    Array of latitude circles for which grid-lines shall be plotted.
  }
  \item{latgr}{
    String indicating if the latitude circles should be plotted. 
    Default is "no".
  }
  \item{ltygrds}{
    The type of line for longitude and latitude circles.
  }
  \item{lwdgrds}{
    The line thickness for longitude and latitude circles.
  }
  \item{con}{
    NA
  }
  \item{\dots}{
    NA
  }
}
\details{
  Plots a pixel plot with either the lambert or stereographical projection. 
  This script is used in the function PlotMap.R.
}
\value{
  A pixel plot of the chosen area and projection.
}
\author{
  History:
  1.0  -  2005-11  (D.J. Steinskog,                        -  Original code
       -            \email{dag.johan.steinskog@nersc.no})  -
       -  xxxx-xx  (C. Frei,                               -  ---
       -            \email{Christoph.Frei@meteoswiss.ch})  -
}
\keyword{datagen}
