File Exchange

image thumbnail

quiver2.m v1.2 (Nov 2009)

version (10.6 KB) by Carlos Adrian Vargas Aguilera
Same as QUIVER, QUIVER3 or FEATHER but with colored, normalized, widened and ARROW's!


Updated 12 Nov 2009

View Version History

View License

This program use QUIVER/QUIVER2 to generate a vector field specialized plot and then customizes the arrows according to its length.

Just type
>> quiver2(U,V)
and that's it. You get
- customized arrows
- NaNs ignored and
- real (U,V) angles with respect to your print/screen.

To use only 7 colors use
>> quiver2(U,V,'c=',jet(7))
or your own colormap if you have my CMAPPING
>> quiver2(U,V,'c=','rygb')

To not normalize the length and draw all lines with the same length use:
>> quiver2(U,V,'n=',0,'w=',1)

To customize the arrows download ARROW by Erik Johnson here at the FileExchange and use:
>> quiver2(U,V,'a@','fancy')

Of course x,y,z may be used, as well as U,V,W and the S,'filled' normal options of QUIVER, besides of others '=' and '@' options as well.

To use it as FEATHER use
>> quiver2(U,V,'t=','feather')
>> quiver2(x,[],U,V)

Recommended to download also my CMAPPING and TLABEL for better use of this function.

Enjoy it!
Bugs reports and comments will be very appreciated!

Cite As

Carlos Adrian Vargas Aguilera (2021). quiver2.m v1.2 (Nov 2009) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

Zhongfu Li

Zhongfu Li

I use this supercool code, but the length of arrows is so long than defult quiver. how can I modify your supercool code ?


You are brilliant. Thank you very much for your hard work and masterful technique.

Travis Miles

Great code, but I did have to go in and manually set the max and min values so I could set my own color scale, rather than using the auto feature. Is there a better way to do this?


very good!

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!