showvec(V) displays the vector field(s) V, as a still image or as a
movie. V is a structure (or a structure array) that can be obtained
from loadvec. By default, showvec uses the norm of the vector field for
the background.
During the movie, the following commands are available:
Space: Enter/exit the 'pause' mode
Right arrow, or 'n' : next frame.
Left arrow, or 'b' : previous frame.
'g' or 'j' : jump to a specified frame
Esc or 'x' or 'q' or Ctrl+C : exit showvec.
showvec(V, BGMODE) uses the BGMODE background ('rot','norm' etc.)
See vec2scal for the list of available background modes. If no BGMODE
specified, 'norm' is used by default. Specify BGMODE='off' or '' for
no background (white).
showvec(V, 'PropertyName', PropertyValue, ...) specifies the property
name / property value pairs (only the first letters of the PropertyName
are required):
'Background' BGMODE : uses the BGMODE background ('rot','norm' etc.)
'Spacing' [NX NY] : displays 1 vector every NX (resp. NY) in the
X (resp. Y) direction.
N : idem, with NX=NY=N.
(by default, displays 32 vectors in each
direction).
'ScaleArrow' SA : stretches the arrows by SA. Use SA=1 for the
arrows to fit in the grid mesh (by default).
'ScaleMode' 'abs','rel' : Defines the 'absolute' or 'relative' mode
for the scaling of the arrow lengths. In
absolute mode, the length of the arrow is the
same for each image. In relative mode, it is
adjusted for each image. Default is 'abs'.
'Colorvec' COL : Color of the vector arrows. COL may be a
string ('r', 'k' etc) or an array [R G B].
'Pause' - : directly enter in the 'pause' mode (press
'space' to exit the pause mode)
'Streamline' [NX,NY]: display streamlines. The starting points of the
streamlines are chosen on a uniform grid with
spacing [NX,NY]. (NX=NY=16 by default)
'Loop': - : loop the movie (press 'esc' to exit)
'Backward': - : plays backward
'Delay' n : waits n seconds between each frame
'Title' TIT : string of the title. The following replacements
are performed (default = '%s [#%i]'):
'%n' : name of the field
'%s' : name of the set
'%i' : field number in the set
'%t' : time in sec. (see getpivtime)
'%t0' : time, with origin t(1)=0.
Some additional PropertyName/Value pairs required for the display of
the background scalar field may also be provided; they will be passed
to showscal:
'CMap': argcolormap : Specifies the colormap, where 'argcolormap'
may be a string ('gray', 'jet' etc) or a
m-by-3 matrix of real numbers between 0.0 and
1.0. See the reference page for COLORMAP.
'CLim': 'all', 0 : normalize the colormap using the min and
max for all the scalar fields (by default).
'each', -1 : normalize the colormap using the min and
max of each scalar field.
[CMIN CMAX]: specifies the min and max of the colormap.
CMAX : specifies the max of the colormap (0 or
-CMAX is taken by default for the min)
'Contour' n : Displays n contour lines
'Contourf' n : Displays n filled contour lines
MOV = showvec(...) returns a movie, that can be re-displayed using
MOVIE, or saved as an AVI file using MOVIE2AVI.
showvec file_name is a shortcut for showvec(loadvec('file_name')).
showvec(FILENAME,...) is a shortcut for showvec(loadvec(FILENAME),...)
showvec without input argument opens a dialog box for file selection.
Examples
v=loadvec('*.vc7');
showvec(v,'norm','scalearrow',2);
showvec *.vc7
showvec('set.mat','loop','title','t = %t s');
showvec(filterf(v,1),'rot','clim','all','spacing',8);
movie2avi(showvec(v,'rot','contour'),'curl.avi');
showvec(v(1:10), 'norm', 'cmap', 'gray', 'colorvec', 'y');
See Also
loadvec, showf, vec2scal, showscal, operf, MOVIE, IMAGE,
QUIVER, COLORMAP.
Published output in the Help browser
showdemo showvec