Method map
| Improve this Doc View Sourcemap(MapFunc, String, Double, Double, Double, Double)
plmap: Plot continental outline or shapefile data in world coordinates
Declaration
public void map(MapFunc mapform, string name, Double minx, Double maxx, Double miny, Double maxy)
Parameters
Type | Name | Description |
---|---|---|
MapFunc | mapform | A user supplied function to transform the original map data coordinates to a new coordinate system. The PLplot-supplied map data is provided as latitudes and longitudes; other Shapefile data may be provided in other coordinate systems as can be found in their .prj plain text files. For example, by using this transform we can change from a longitude, latitude coordinate to a polar stereographic projection. Initially, x[0]..[n-1] are the original x coordinates (longitudes for the PLplot-supplied data) and y[0]..y[n-1] are the corresponding y coordinates (latitudes for the PLplot supplied data). After the call to mapform(), x[] and y[] should be replaced by the corresponding plot coordinates. If no transform is desired, mapform can be replaced by NULL. |
System.String | name | An ascii character string specifying the type of map plotted. This is either one of the PLplot built-in maps or the file name of a set of Shapefile files without the file extensions. For the PLplot built-in maps the possible values are: "globe" -- continental outlines "usa" -- USA and state boundaries "cglobe" -- continental outlines and countries "usaglobe" -- USA, state boundaries and continental outlines |
Double | minx | The minimum x value of map elements to be drawn. For the built in maps this is a measure of longitude. For Shapefiles the units must match the projection. The value of minx must be less than the value of maxx. Specifying a useful limit for these limits provides a useful optimization for complex or detailed maps. |
Double | maxx | The maximum x value of map elements to be drawn |
Double | miny | The minimum y value of map elements to be drawn. For the built in maps this is a measure of latitude. For Shapefiles the units must match the projection. The value of miny must be less than the value of maxy. |
Double | maxy | The maximum y value of map elements to be drawn. |
Remarks
Plots continental outlines or shapefile data in world coordinates. A demonstration of how to use this function to create different projections can be found in examples/c/x19c. PLplot is provided with basic coastal outlines and USA state borders. These can be used irrespective of whether Shapefile support is built into PLplot. With Shapefile support this function can also be used with user Shapefiles, in which case it will plot the entire contents of a Shapefile joining each point of each Shapefile element with a line. Shapefiles have become a popular standard for geographical data and data in this format can be easily found from a number of online sources. Shapefile data is actually provided as three or more files with the same filename, but different extensions. The .shp and .shx files are required for plotting Shapefile data with PLplot.