3.5

3.5 | 2 ratings Rate this file 17 Downloads (last 30 days) File Size: 3.6 KB File ID: #37371
image thumbnail

ARROWS: generalized 2-D arrows plot

by

 

02 Jul 2012 (Updated )

Vectorized and flexible arrow plot function in 2-D

| Watch this File

File Information
Description

This little function is an alternative to other existing arrow plot functions, since it has very simple, vectorized and effective coding. In fact, arrows are all plotted with a single patch command! The function also accepts any standard patch parameter/value pair like 'FaceColor', 'EdgeColor', 'LineWidth', etc.

It can be used to plot a personalized arrow at coordinates X,Y with length L and azimuth AZ, or any of these arguments can be vector or matrix, like QUIVER did, to plot multiple arrows. The option 'Cartesian' allows defining U and V components instead of polar L and AZ.

Arrow's aspect ratio, head and segment line shapes are configurable with 4 parameters: head width, head length, head inside length and segment line width, all normalized to arrow's length. See the upper part of examples figure.

It is also possible to vary only the arrow length with fixed head and line width, using a reference length. The examples figure shows the effect of this option: upper arrows use a reference length, while lower arrows do not.

Required Products MATLAB
MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
09 Sep 2013 Saulo Meirelles  
16 Aug 2013 irfan  
Updates
18 Mar 2013

New options:
- 'Cartesian': define (U,V) instead of (L,AZ)
- 'Ref', REFLENGTH : fixes head and width relative to a reference length

Contact us