: [h] = dxfdraw (dxf)
: [h] = dxfdraw (dxf, clr)
: [h] = dxfdraw (…, name, value, …)

Draw a map of a DXF file based on a DXF cell array or DXF drawing struct.

Input argument dxf is the name of a DXF cell array (see dxfread.m), or the name of a DXF file, or a DXF drawing struct made by dxfparse.

clr is the color used to draw the DXF contents. All lines and arcs are drawn in the same color; similar for all filled surfaces. For points, lines and polylines this can be a 3x1 RGB vector or a color code. For polygons it can be a 2x1 vector of color codes or a 2x3 double array of RGB entries. The default is [0.7 0.7 0.7; 0.8 0.9 0.99].

In addition several graphics properties can be specified, e.g., linestyle and linewidth. No checks are performed whether these are valid for the entities present in the DXF cell array or file.

Currently the following entities are supported: POINT, LINE, POLYLINE, LWPOLYLINE, CIRCLE, ARC and 3DFACE. For drawing CIRCLE and ARC entities functions from the geometry packge are required.

Optional output argument h is the graphics handle of the resulting map.

See also: dxfread, dxfparse.

Package: mapping