comparison scripts/plot/quiver.m @ 8056:9a6f4713f765

Add area, bar, quiver and stair series graphics objects. Document them
author David Bateman <dbateman@free.fr>
date Tue, 26 Aug 2008 11:58:14 -0400
parents dd88d61d443f
children ec4d9d657b17
comparison
equal deleted inserted replaced
8055:d51c3541be28 8056:9a6f4713f765
41 ## in a similar manner to the line styles used with the @code{plot} command. 41 ## in a similar manner to the line styles used with the @code{plot} command.
42 ## If a marker is specified then markers at the grid points of the vectors are 42 ## If a marker is specified then markers at the grid points of the vectors are
43 ## printed rather than arrows. If the argument 'filled' is given then the 43 ## printed rather than arrows. If the argument 'filled' is given then the
44 ## markers as filled. 44 ## markers as filled.
45 ## 45 ##
46 ## The optional return value @var{h} provides a list of handles to the 46 ## The optional return value @var{h} provides a quiver group that
47 ## the parts of the vector field (body, arrow and marker). 47 ## regroups the components of the quiver plot (body, arrow and marker),
48 ## and allows them to be changed together
48 ## 49 ##
49 ## @example 50 ## @example
50 ## @group 51 ## @group
51 ## [x, y] = meshgrid (1:2:20); 52 ## [x, y] = meshgrid (1:2:20);
52 ## quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10)); 53 ## h = quiver (x, y, sin (2*pi*x/10), sin (2*pi*y/10));
54 ## set (h, "maxheadsize", 0.33);
53 ## @end group 55 ## @end group
54 ## @end example 56 ## @end example
55 ## 57 ##
56 ## @seealso{plot} 58 ## @seealso{plot}
57 ## @end deftypefn 59 ## @end deftypefn
79 81
80 endfunction 82 endfunction
81 83
82 %!demo 84 %!demo
83 %! [x,y] = meshgrid(1:2:20); 85 %! [x,y] = meshgrid(1:2:20);
84 %! quiver(x,y,sin(2*pi*x/10),sin(2*pi*y/10)) 86 %! h = quiver(x,y,sin(2*pi*x/10),sin(2*pi*y/10))
87 %! set (h, "maxheadsize", 0.33);
85 88
86 %!demo 89 %!demo
87 %! axis("equal"); 90 %! axis("equal");
88 %! x=linspace(0,3,80); y=sin(2*pi*x); theta=2*pi*x+pi/2; 91 %! x=linspace(0,3,80); y=sin(2*pi*x); theta=2*pi*x+pi/2;
89 %! quiver(x,y,sin(theta)/10,cos(theta)/10); 92 %! quiver(x,y,sin(theta)/10,cos(theta)/10);