Main Content

Summary of Polygon Display Functions

The following table lists the available Mapping Toolbox™ patch polygon display functions.


Used For


Filled 2-D map polygons


Filled 3-D map polygons in 3-D space


Display map latitude and longitude data in 2-D


Display map data without projection in 2-D


Patch objects projected on map axes


Patches projected as individual objects on map axes

The fillm function makes use of the low-level function patchm. The toolbox provides another patch drawing function called patchesm. The optimal use of either depends on the application and user preferences. The patchm function creates one displayed object, which can contain multiple faces that do not necessarily connect. Mapping Toolbox data arrays contain NaNs to separate unconnected patch faces, unlike MATLAB® patch display functions, which cannot handle NaN-delimited data for patches. The patchesm function, on the other hand, treats each face as a separate object and returns an array of patch objects. In general, patchm requires more memory but is faster than patchesm. The patchesm function is useful if you need to manipulate the appearance of individual patches (as thematic maps often require).

The geoshow and mapshow functions provide a superset of functionality for displaying unprojected and projected geodata, respectively, in two dimensions. These functions accept geographic data structures (geostructs and mapstructs) and coordinate vector arrays, but can also directly read shapefiles and geolocated raster files. With them, you can map polygon data, controlling rendering by constructing symbolspecs, data structures that you can construct with the makesymbolspec function. You can easily construct symbolspecs for point and line data as well as polygon data to control its display in geoshow, mapshow, and mapview.

Related Topics