Skip to content

draw

Draw a shape on the active chart.

draw(type, ...)

Adds a shape (rectangle, ellipse, arrow, line, polygon, text, etc.) to the active chart. type is a string naming the shape kind. Trailing name-value pairs set position, size, color, and other shape properties.

MathJet-specific (see Reference > Visualization > Annotation).

draw('rectangle', 'Position', [0 0 1 1])
draw('arrow', 'Start', [0 0], 'End', [1 1])
  • shape — Get a shape handle by name.
  • group — Group multiple objects together.