title: How can I fix vector scale in quiver2D in R oceanview package?
body: <pre><code>rm(list = ls())
  library(RNetCDF)
  library(rgl)
  library(plot3D)
  library(plot3Drgl)
  library(OceanView)
  
  vec_surf_field=TRUE
  
  ###
  ### read variables(lon,lat,u,v)
  ###
  
  u2&lt;-array(0,c(120,110,30,120))
  v2&lt;-array(0,c(120,110,30,120))
  vec2&lt;-c(0:9)
  for(j in vec2){
    readname="/data1/kimyy/oman_restore_04_18/197"
    readname2="12/ocean_snap_197"
    readname3="12.nc"
    rname=paste(readname,as.character(j),readname2,as.character(j),readname3,sep="")
    nc2 &lt;- open.nc(rname)
    u2_temp&lt;-var.get.nc(nc2,"u");
    v2_temp&lt;-var.get.nc(nc2,"v");
    temp2_temp&lt;-var.get.nc(nc2,"temp")
    eta_t2_temp&lt;-var.get.nc(nc2,"eta_t")
    lon2&lt;-var.get.nc(nc2,"xt_ocean");
    lat2&lt;-var.get.nc(nc2,"yt_ocean");
    level2&lt;-var.get.nc(nc2,"st_ocean");
    ilevel2 = -level2
  
    for (i in c(1:12))
    {
      u2[1:length(lon2),1:length(lat2),1:length(level2),j*12+i]&lt;-u2_temp[1:length(lon2),1:length(lat2),1:length(level2),i]
      v2[1:length(lon2),1:length(lat2),1:length(level2),j*12+i]&lt;-v2_temp[1:length(lon2),1:length(lat2),1:length(level2),i]
      temp2[1:length(lon2),1:length(lat2),1:length(level2),j*12+i]&lt;-temp2_temp[1:length(lon2),1:length(lat2),1:length(level2),i]
      eta_t2[1:length(lon2),1:length(lat2),j*12+i]&lt;-eta_t2_temp[1:length(lon2),1:length(lat2),i]
    }
  }
  
  
  ###
  ###  surface vector field
  ###
  
  if (vec_surf_field==TRUE)
  {
    for (l in c(1:120))
    {
      year=as.character(as.integer((l-1)/12))
      month=as.character(l-as.integer((l-1)/12)*12)
      if (as.integer(month)&lt;=9) {
        filename=paste("/data1/kimyy/oman_restore_04_18/gif/vec_surf_field/197",as.character(year),"0",as.character(month),".png",sep="");
        gifname=paste("Surface Vector (", as.character(year),"year ",as.character(month),"month)",sep="");
      } else {
        filename=paste("/data1/kimyy/oman_restore_04_18/gif/vec_surf_field/197",as.character(year),as.character(month),".png",sep="");
        gifname=paste("Surface Vector (", as.character(year),"year ",as.character(month),"month)",sep="");
      }
  
      png(file=filename,width=1300,height=1100)
      par(mar=c(9,10,7,7), mgp = c(7, 3, 0))
      #par(mar=c(10,11,8,8), mgp = c(8, 4, 0))
      quiver2D(u=u2[1:120,1:110,1,l],v=v2[1:120,1:110,1,l], x = lon2, y = lat2, 
               colvar = sqrt(u2[1:120,1:110,1,l]^2 + v2[1:120,1:110,1,l]^2), clim = c(0, 0.5), col="black",
               main = paste (gifname), xlab = "Degrees East (°E)", ylab = "Degrees North (°N)",
               arr.max = 0.15, arr.min = 0.15, clab = "Speed (m/s)", scale=2.5, by=4, NAcol="white", asp=1,
               cex.axis=3, cex.main=3.5, cex.lab=3, colkey=NULL)
      dev.off()
    }
  }
  </code></pre>
  
  <p>that code has this process
  1. read the 120 monthly data
  2. plot 120 surface vector field</p>
  
  <p>in that process, I can't fix the vector(arrow length) scale.</p>
  
  <p><a href="http://i.stack.imgur.com/vmWiM.png" rel="nofollow">enter image description here</a></p>
  
  <p><a href="http://i.stack.imgur.com/pGiY3.png" rel="nofollow">enter image description here</a></p>
  
  <p>as you can see the difference of two pictures,
  vector scale is different.
  would you help me solve this problem?</p>
  
  <p>ps) in matlab, I can solve this 'quiver(x,y,u,v,'AutoScale','off');</p>