File Exchange

image thumbnail

Arrow plotter

version 1.0 (1.27 KB) by

very simple customizable inline function to draw arrows.

15 Downloads

Updated

View License

Very simple customizable inline function to draw arrows. Lightweight and fast for drawing many, many arrows. You customize fill color, linewidth, etc... Tune theta up if you want a wider arrowhead.

takes two [x y] coords and one double, headsize, that allows you to tune the length of the arrowhead to your liking. It's normally set to (length of the line) / 2.5, the headsize variable acts as a multiplier of that (in the numerator).

made this in just a few minutes because the other arrow.m thing is too unwieldy and slow. Enjoy!

Comments and Ratings (3)

Very useful and easy to use. Thanks.

p zl

p zl (view profile)

pretty good!

Roger Parkyn

Nice and simple. Works OK if the xlimits and ylimits are across similar ranges. In such cases, or where plotting will be similar each call, this should be great. Otherwise the arrowhead shape is a bit unpredictable due to distortion.

I ended up going back to arrow.m (by Erik A. Johnson, it is on the file exchange. Yes that does look like a monster, at nearly 1400 lines!).

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video