Code covered by the BSD License  

Highlights from
QuiverS

Be the first to rate this file! 10 Downloads (last 30 days) File Size: 2.71 KB File ID: #24482
image thumbnail

QuiverS

by Bertrand Dano

 

19 Jun 2009

Quiver vector plot with reference vector showing scale

| Watch this File

File Information
Description

Quiver vector plot function with reference vector showing the scale of the vector magnitude. Scale location adjustable as well as units. Best used foe publication or technical papers when color is an issue.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
02 Mar 2011 Pär-Ola

Use the following patch to get correct placement of label inside rectangle if using 'XDir' = 'Reverse'

--- /tmp/quivers/quivers.m 2009-06-19 15:34:20.000000000 +0200
+++ quivers.m 2011-03-02 15:53:00.833987474 +0100
@@ -139,7 +139,11 @@
 hv = [y;y+v; y+v-alpha*(v-beta*(u+eps));y+v; y+v-alpha*(v+beta*(u+eps))];
 
 plot(hu(:),hv(:),[col ls]);
-xt=x; yt=ry+ly-2*ly/3;
-ht=text(xt,yt,[num2str(Vmax) ' ' Sunit]); D=get(ht,'extent'); set(ht,'visible','off')
-xt=rx+(lx-D(3))/2;
-ht=text(xt,yt,[num2str(Vmax) ' ' Sunit]);
+% Center of rectangle
+xt=(2*rx+lx)/2;
+yt=ry+ly/3;
+
+% Print text and set adjustment
+ht=text(xt,yt,[num2str(Vmax) ' ' Sunit], ...
+ 'HorizontalAlignment', 'center', ...
+ 'VerticalAlignment', 'middle');

19 Dec 2011 Stewart Smith

antoine is really annoying

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
vector plot Bertrand Dano 19 Jun 2009 11:51:22
fluid dynamics Bertrand Dano 19 Jun 2009 11:51:22
oceanography Bertrand Dano 19 Jun 2009 11:51:22
aerodynamics Bertrand Dano 19 Jun 2009 11:51:22
fluid dynamics Pavel 08 Jul 2011 02:35:54

Contact us at files@mathworks.com