colormap = (/"white", "darkolivegreen1", "darkolivegreen2","chartreuse2","chartreuse3","chartreuse4","darkgreen"/) res@cnFillPalette = colormap ncl小技巧 where(condtnl_expr , true_value, false_value) 用于处理缺测值、判断等 ind(larray [*] : logical) 返回数组中满足条件的index resha...
1. 把NCL_colormap.nc和get_NCL_colormap.m放到当前matlab运行目录下; 2. 然后运行下面这句就OK了,括号里写上colormap名字(以matlab_jet为例): colormap(get_NCL_colormap('matlab_jet')) 希望对习惯matlab画图的同学有帮助~ 最后说明:我不是colormap的生产者,我只是colormap的搬运工。虽然是搬运工吧,但...
do n=0,32 statecolors(n) = GetFillColorIndex(levels,colors,data(n)) end do ;为statecolors数组赋值,GetFillColorIndex函数会根据data(n)的值 ;在level中的那个范围内选择相应的colors代号。 res = True res@gsnFrame = False res@mpDataSetName = Earth..4 res@mpDataBaseVersion = Ncarg4_1 res@...
do n=0,32 statecolors(n) = GetFillColorIndex(levels,colors,data(n)) end do ;为statecolors数组赋值,GetFillColorIndex函数会根据data(n)的值 ;在level中的那个范围内选择相应的colors代号。 res = True res@gsnFrame = False res@mpDataSetName = Earth..4 res@mpDataBaseVersion = Ncarg4_1 res@...
do n=0,32 statecolors(n) = GetFillColorIndex(levels,colors,data(n)) end do ;为statecolors数组赋值,GetFillColorIndex函数会根据data(n)的值 ;在level中的那个范围内选择相应的colors代号。 res = True res@gsnFrame = False res@mpDataSetName = "Earth..4" res@mpDataBaseVersion = "Ncarg4_1"...
do n=0,32 statecolors(n) = GetFillColorIndex(levels,colors,data(n))end do ;为statecolors数组赋值,GetFillColorIndex函数会根据data(n)的值 ;在level中的那个范围内选择相应的colors代号。res = Trueres@gsnFrame = Falseres@mpDataSetName = Earth..4res@mpDataBaseVersion = Ncarg4_1res@vpWidthF...
addfile,addfiles:打开文件获取文件句柄。文件句柄包含文件全局属性,可以用getvaratts获取。 isfilepresent:测试文件存在。 getfilevarnames,getfilevardims,getfilevaratts,getfilevardimsizes,getfilevartypes:查询文件数据属性。 isfilevar,isfilevaratt,isfilevardim,isfilevarcoord:测试文件数据属性。15...
get_ncl_version get_script_name get_script_prefix_name get_sphere_radius getbitsone getenv getfiledimsizes getfilevaratts getfilevardims getfilevardimsizes getfilevarnames getfilevartypes GetFillColor GetFillColorIndex getFillValue getind_latlon2d ...
2)end ifif (vmax(i).ge.42 .and. vmax(i) .lt. 51) thenresLine@gsLineColor = colours(3)end ifif (vmax(i).ge.51) thenresLine@gsLineColor = colours(4)end ifdumLine(i) = gsn_add_polyline(wks, plot, xx, yy, resLine)end doresDot@gsMarkerIndex = 1resDot@gsMarkerColor = "...
get the same marker color and size for all the lines that have markers. The default marker size is 0.01, so a value of 0.03 triples the marker size. Line 51: plot = gsn_xy(wks,x,y2,resources) Draw the plot with the new resources you set. Line 53: ;--- Begin fifth plot -...