Code covered by the BSD License  

Highlights from
Arrow plotter

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

Arrow plotter

by Ryan Molecke

 

04 May 2010

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
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!).

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
arrow Ryan Molecke 05 May 2010 10:44:59
plotting Ryan Molecke 05 May 2010 10:44:59
image processing Ryan Molecke 05 May 2010 10:44:59
inline functions Ryan Molecke 05 May 2010 10:44:59
widgets Ryan Molecke 05 May 2010 10:44:59
arrow razmig 14 Jun 2011 08:55:01

Contact us at files@mathworks.com