[Thread Prev][Thread Next][Index]
Re: [ferret_users] Plotting curvilinear vectors
Dear Steve,
I forgot that the whole thing that precipitated this discussion is that you wanted a scaling vector key. So try this script which uses Ansley's poly_arrow_key:
************************
use etopo5
define grid/like=rose map_grid
set grid map_grid
set region/x=80w:50w/y=20n:40n
go mp_mercator 30 -65
go mp_aspect
fill/levels=(0,10000,10000)/pal=grey/nokey/noaxis/nolabel rose[g=map_grid],x_page,y_page
go mp_graticule `360-80` `360-50` 5.0 20 40 5.0 1
let lon = { `360-75`, `360-70`, `360-65` }
let lat = { 25, 30, 35 }
let temperature = { 10, 20, 30 }
let fill_values = ysequence( temperature )
let rt2 = 2^0.5
let u = { `100/rt2`, 100, 0 }
let v = { `100/rt2`, 0, 100 }
let vel_scl = 50
go mp_poly_vectors lon lat u v `vel_scl` "arrow"
polygon/over/nolabel/key/noaxes mp_x_arrow, mp_y_arrow, fill_values[j=1:`num_vectors`]
! Draw scaling vector
go poly_arrow_key "Velocity" `vel_scl` red
*************************
The result should look like the attached gif:
------------------------------------------------------------------------------------------
Edward D. (Ned) Cokelet, Ph.D. Oceanographer
NOAA/PMEL off: (206) 526-6820
7600 Sand Point Way NE fax: (206) 526-6485
Seattle, WA 98115-6439
Edward.D.Cokelet@noaa.gov
The contents of this message are mine personally and do not necessarily reflect any position of the Government or the National Oceanic and Atmospheric Administration.
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement