Previous: Two-dimensional Function Plotting, Up: Two-Dimensional Plots [Contents][Index]

- Function File:
**rectangle***()* - Function File:
**rectangle***(…, "Position",*`pos`) - Function File:
**rectangle***(…, "Curvature",*`curv`) - Function File:
**rectangle***(…, "EdgeColor",*`ec`) - Function File:
**rectangle***(…, "FaceColor",*`fc`) - Function File:
**rectangle***(*`hax`, …) - Function File:
`h`=**rectangle***(…)* Draw a rectangular patch defined by

`pos`and`curv`.The variable

defines the lower left-hand corner of the patch and`pos`(1:2)

defines its width and height. By default, the value of`pos`(3:4)`pos`is`[0, 0, 1, 1]`

.The variable

`curv`defines the curvature of the sides of the rectangle and may be a scalar or two-element vector with values between 0 and 1. A value of 0 represents no curvature of the side, whereas a value of 1 means that the side is entirely curved into the arc of a circle. If`curv`is a two-element vector, then the first element is the curvature along the x-axis of the patch and the second along y-axis.If

`curv`is a scalar, it represents the curvature of the shorter of the two sides of the rectangle and the curvature of the other side is defined bymin (pos(1:2)) / max (pos(1:2)) * curv

Additional property/value pairs are passed to the underlying patch command.

If the first argument

`hax`is an axes handle, then plot into this axis, rather than the current axes returned by`gca`

.The optional return value

`h`is a graphics handle to the created rectangle object.

**See also:** patch, line, cylinder, ellipsoid, sphere.

Previous: Two-dimensional Function Plotting, Up: Two-Dimensional Plots [Contents][Index]