vec | R Documentation |
Plot arrows for e.g. a wind field or ocean currents.
vec(
x,
y,
it = NULL,
a = NULL,
r = 1,
ix = NULL,
iy = NULL,
new = TRUE,
nx = 150,
ny = 80,
projection = "lonlat",
lonR = NULL,
latR = NULL,
axiR = 0,
verbose = FALSE,
length = NULL,
...
)
x |
the zonal comonents of the vectors |
y |
the meridional comonents of the vectors |
it |
see |
a |
used to scale the length of the arrows |
r |
used to make a 3D effect of plotting the arrows up in the air. |
new |
TRUE: create a new graphic device. |
nx |
is the number of vectors/points along the x-axis |
ny |
is the number of vectors/points along the y-axis |
projection |
Projections: c("lonlat","sphere","np","sp") - the latter gives stereographic views from the North and south poles. |
lonR |
Only for the spherical projection |
latR |
Only for the spherical projection |
axiR |
Only for the spherical projection |
xlim |
see |
ylim |
see |
n |
The number of colour breaks in the color bar |
breaks |
graphics setting - see |
type |
graphics setting - colour shading or contour |
gridlines |
Only for the lon-lat projection |
is |
see |
map
## Not run:
sst <- sst.NCEP()
download.file('ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.derived/surface/uwnd.mon.mean.nc','ncep_u.nc')
download.file('ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.derived/surface/vwnd.mon.mean.nc','ncep_v.nc')
u <- retrieve('ncep_u.nc')
v <- retrieve('ncep_v.nc')
## Make a map of SSt and wind vectors:
map(sst)
vec(u,v,a=1.5,length=0.03,new=FALSE)
## Make a fancy map
map(sst,projection='sphere')
vec(u,v,a=0.5,r=1.1,length=0.03,projection='sphere',new=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.