Draw a map based on raster or shapefile data.
data can be:
If the first two arguments to mapshow.m contain numeric vectors, mapshow will simply draw the vectors as XY lines. The vectors can contain NaNs (in identical positions) to separate parts.
For raster maps currently no further input arguments are recognized. For shapefile data, optional argument clr can be a predefined color ("k", "c", etc.), and RGB triplet, or a 2 X 1 column vector of predefined colors or RGB triplets (each row containing a predefined color or triplet). The upper row will be used for points and lines, the lower row for solid shape features. For XY data, only the first row is used. One-character color codes can be preceded by one-character linestyle indicators (":", "-", "–", "-.") to modify the linestyle for polylines, or marker styles ("o", "*", ".", "+", "," ">", "<", "s", "d", "h", "v", "^") for points.
Any other arguments are considered graphics properties for (multi-)points, polylines and polygons and will be conveyed as-is to the actual plotting routines.
Additionally, if the first argument is a shape struct, mapshow accepts a property-value pair "symbolspec" (minimum abbreviation "symb") with a value comprising a cell array containing instructions on how to display the shape contents. Multiple sympolspec property/value pairs can be specified.
Return argument h is a handle to the plot figure.
Examples:
H = mapshow ("/full/path/to/map") (draws a raster map and returns the figure handle in H)
H = mapshow ("shape.shp", ":g") H = mapshow ("shape.shp", "color", "g", "linestyle", ":") (draws a polygon shapefile "shape.shp" with green dotted lines and return figure handle in H)
mapshow (X, Y, "k") (plot vectors X and Y in black color)
mapshow (X, Y, "-.r", "linewidth", 5) (plot vectors X and Y as a dashdotted thick red line)
mapshow (data, "symbolspec", symsp1, "symb", symsp2) (draw contents of shapestruct (or mapstruct) data according to the symbolspecs symsp1 and symsp2)
See also: geoshow, shapedraw, shapeinfo, shaperead, shapewrite, makesymbolspec, rasterread, rasterdraw, rasterinfo.
Package: mapping