FUNCTION REFERENCE

rectangle

Draw a 2-D rectangle or ellipse.

Draw a 2-D rectangle or ellipse.

Syntax

r = rectangle('Position', [x y w h])

Syntax

r = rectangle(ax, 'Position', [x y w h], Name, Value, ...)

Draws a rectangle at [x y w h] in data coordinates. Supports Curvature (scalar or [cx cy] in 0..1; [1 1] draws an ellipse), FaceColor, EdgeColor, LineWidth, LineStyle and Visible.

Example

r = rectangle('Position', [1 1 2 3], 'Curvature', 1); r.Curvature   % [1 1]

Differences from MATLAB: Not checked against MATLAB yet.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.