Code covered by the BSD License  

Highlights from
Arrow plotter

Be the first to rate this file! 29 Downloads (last 30 days) File Size: 1.27 KB File ID: #27475
image thumbnail

Arrow plotter

by

 

very simple customizable inline function to draw arrows.

| Watch this File

File Information
Description

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!

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
16 Jun 2011 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!).

Contact us