This function lets you easily draw shapes on a current figure. The image above was created by
draw('rectangle','linewidth',1.5,'color',[0.08 0.69 0.10])
draw('doublearrow','linewidth',3,'headstyle','rose','color',[0.98 0.45 0.24])
After calling draw, you may:
* Click and drag to draw shapes,
* press 'a', 'e', 'l', 'r', or 'd' on your keyboard to change the shape to arrow, ellipse, line, rectangle, or doublearrow,
* press backspace to delete previous shape,
* press escape to delete all shapes and quit drawing mode, or
* press enter to keep shapes as they appear in the figure.
Chad Greene (2021). draw (https://www.mathworks.com/matlabcentral/fileexchange/53139-draw), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!