Continue from my previous question 'create vectorplot from velocity dataset'. I still have 2 question how to make the figure look like below:
1) How to make the region interpolation? I have tried used interpolate = TRUE but didn't work.
2) How to define the arrow symbol with the same length (It's mean the arrow only show the velocity direction)
Here my data uv.nc and syntax I have written:
library (raster)
flname <- 'uv.nc'
u <- raster(flname, varname = 'U')
v <- raster(flname, varname = 'V')
uv <- stack(u,v)
s <- sqrt(u^2 + v^2)
library(rasterVis)
jet <- colorRampPalette(c('#00007F', 'blue', '#007FFF', 'cyan','#7FFF7F', 'yellow', '#FF7F00', 'red', '#7F0000'))
range = seq(0, 0.5, 0.05)
vectorplot(uv, isField = 'dXY', interpolate = TRUE, col.regions = jet, region=s, length=0.05)
