Project patch objects on map axes


h = patchm(lat,lon,cdata)
h = patchm(lat,lon,cdata,PropertyName,PropertyValue,...)
h = patchm(lat,lon,PropertyName,PropertyValue,...)
h = patchm(lat,lon,z,cdata)
h = patchm(lat,lon,z,cdata, PropertyName,PropertyValue,...)


h = patchm(lat,lon,cdata) and h = patchm(lat,lon,cdata,PropertyName,PropertyValue,...) project and display patch (polygon) objects defined by their vertices given in lat and lon on the current map axes. lat and lon must be vectors. The color data, cdata, can be any color data designation supported by the standard MATLAB® patch function. The object handle or handles, h, can be returned.

h = patchm(lat,lon,PropertyName,PropertyValue,...) allows any property name/property value pair supported by patch to be assigned to the patchm object.

h = patchm(lat,lon,z,cdata) and h = patchm(lat,lon,z,cdata, PropertyName,PropertyValue,...) allow the assignment of an altitude, z, to each patch object. The default altitude is z = 0.


load coast
axesm sinusoid; framem
h = patchm(lat,long,'b');


ans =

More About

collapse all


How patchm Works

This Mapping Toolbox™ function is very similar to the standard MATLAB patch function. Like its analog, and unlike higher level functions such as fillm and fill3m, patchm adds patch objects to the current map axes regardless of hold state. Except for XData, YData, and ZData, all line properties and styles available through patch are supported by patchm.

When A Patch Is Completely Trimmed Away

Removing graphic objects that fall outside the map frame is called trimming. If, after trimming to the map frame no polygons remain to be seen within it, patchm creates no patches and returns an empty 0-by-1 handle. When this occurs, automatic reprojection of the patch data (by changing the projection or any of its parameters) will not be possible. Instead, after changing the projection, call patchm again.

See Also

| |

Was this topic helpful?