|
Last change
on this file since 6287 was 6287, checked in by Mathieu Morlighem, 15 years ago |
|
plot quiver back to NORMAL
|
|
File size:
617 bytes
|
| Line | |
|---|
| 1 | function plot_quiver(x,y,u,v,options),
|
|---|
| 2 | %PLOT_QUIVER - quiver plot with colors
|
|---|
| 3 | %
|
|---|
| 4 | % to be perfected tomorrow
|
|---|
| 5 | %
|
|---|
| 6 | % Usage:
|
|---|
| 7 | % plot_quiver(x,y,u,v,options)
|
|---|
| 8 | %
|
|---|
| 9 | % Example:
|
|---|
| 10 | % plot_quiver(md.x,md.y,md.vx,md.vy,options);
|
|---|
| 11 |
|
|---|
| 12 | %process fields
|
|---|
| 13 | [quivers,palette]=quiver_process(x,y,u,v,options);
|
|---|
| 14 |
|
|---|
| 15 | %loop over the number of colors
|
|---|
| 16 | hold on
|
|---|
| 17 | h=[];
|
|---|
| 18 | for i=1:quivers.numcolors
|
|---|
| 19 | pos=find(quivers.colorind==i);
|
|---|
| 20 | hprime=quiver(quivers.x(pos),quivers.y(pos),quivers.u(pos),quivers.v(pos),...
|
|---|
| 21 | 'Color',palette(i,:),'ShowArrowHead','on','AutoScale','off');
|
|---|
| 22 | h=[h;hprime];
|
|---|
| 23 | end
|
|---|
| 24 |
|
|---|
| 25 | %take care of colorbar
|
|---|
| 26 | quiver_colorbar(quivers,options);
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.