I answer my own question. aspX and aspY are the parameters for fine tuning:
vectorplot(field, isField='dXY', narrows=5e2, aspX=2,aspY=2) Sorry for the premature post, André -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Monday, February 03, 2014 5:03 PM To: [email protected] Subject: [R-sig-Geo] vectorplot rasterVis adjust length of arrows Hi, I use rasterVis's vectorplot function to visualize vector fields (rasterVis_0.27, R version 3.0.2, Platform: x86_64-w64-mingw32/x64 (64-bit)) from a raster stack in UTM coordinates. The example from the vectorplot help to illustrate the issue: u <- v <- raster(xmn=0, xmx=2, ymn=0, ymx=2, ncol=1e3, nrow=1e3) x <- init(u, v='x') y <- init(u, v='y') u <- y * cos(x) v <- y * sin(x) field <- stack(u, v) names(field) <- c('u', 'v') vectorplot(field, isField='dXY', narrows=5e2) # Works as expected # However when the raster is in projected coordinates with high absolute coordinate values (UTM in m) the arrows disappear or # are at least infinitely small projection(field) <- "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" extent(field) <- c(314420, 314420+1000, 4912697, 4912697+1000) vectorplot(field, isField='dXY', narrows=5e2) Is there any way to adjust the length of the arrows (not arrow heads) as needed? My plotting script worked fine in this context with a previous rasterVis version (0.21 I think) so maybe I miss some fundamental changes? Best regards, André _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
