Rank: 43924 based on 0 downloads (last 30 days) and 0 files submitted
photo

Jason Sippel

E-mail
Company/University
NASA GSFC

Personal Profile:

Postdoc

Professional Interests:
meteorology, data assimilation

 

Watch this Author's files

 

Comments and Ratings by Jason View all
Updated File Comments Rating
02 Oct 2009 ncquiverref Quiver (vector) with a reference vector or color code on a map or Cartesian axes. Author: Andrew Roberts

Great code! After chatting with the author, I have found that the below addendum is useful for plotting a small subdomian of model output. This would be useful if, for example, you are tracking a tropical cyclone in a Lagrangian system with ilat,flat,ilon, and flon sampled from your model grid based on the number of grid points from the storm center.

If you don't do something similar to this, the physical size of the map frame on the screen may not match from one figure to the next.

Here's the code:

    tightmap
    xlim=get(gca,'xlim');
    ylim=get(gca,'ylim');
    
   cutfactor = 1.3;
   xcenter=mean(xlim);
   xoffset=diff(xlim)/2;
   ycenter=mean(ylim);
   yoffset=diff(ylim)/2;
   set(gca,'Xlim',[xcenter-cutfactor*xoffset xcenter+cutfactor*xoffset]);
   set(gca,'Ylim',[ycenter-cutfactor*yoffset ycenter+cutfactor*yoffset]);

25 Sep 2009 ncquiverref Quiver (vector) with a reference vector or color code on a map or Cartesian axes. Author: Andrew Roberts

Contact us at files@mathworks.com