根据你想绘制图形选择合适的绘图函数,一般都选择gsn_csm_xxx的绘图接口函数,因为它们会比一般的gsn_xxx绘图接口函数多更多的默认设置,我们可以少设置很多属性,能更快完成我们想要的“标准”图形。如: xy = gsn_csm_xy(wks,x,y,res) plot = gsn_csm_contour(wks,data,res) plot = gsn_csm_contour_map(wks...
plot(2) = gsn_csm_xy(wks,xtimes,var3_m,res) ; === res1@xyLineColor = "orange" res1@xyLineThicknessF = 5. ; for higher quality large image res1@tiYAxisString = var4name res1@tiYAxisFontColor = res1@xyLineColor res1@tmYLLabelFontColor = res1@xyLineColor res1@tiYAxisFontHeig...
plot =gsn_csm_xy(wks,x,y,res) ;绘制曲线,此处x为1维矩阵,y可以是多维矩阵,要求y的列数与x的列数相同
res@gsnCenterString = "Main title" res@gsnLeftString = "Left title" res@gsnRightString = "Right title" res@tiXAxisString = "X axis" res@tiYAxisString = "Y axis" res@tiXAxisFontHeightF = 0.03 res@tiXAxisFontColor = "orange" res@tiYAxisFontColor = "blue" plot = gsn_csm_y(wks, ...
确保你的脚本文件是以.ncl为后缀,并且其中的代码符合NCL的语法规则。例如,一个简单的NCL脚本可能如下所示: ncl begin wks = gsn_open_wks("x11","Test Plot") x = (/1,2,3,4,5/) y = (/10,20,25,30,40/) plot = gsn_csm_xy(wks,x,y) draw(plot) frame(wks) end 打开命令行终端: 在...
y = new((/4,npts/), "float") y(0, :) = sin(0.08 * x) y(1, :) = cos(0.08 * x) y(2, :) = sin(0.08 * x) + cos(0.32 * x) y(3, :) = sin(0.08 * x) * cos(0.32 * x) wks = gsn_open_wks("png", output_path +"xy_legend_ex2") res = True res@gsnDraw ...
gsn_csm_xy 创建并绘制一个XY坐 function 标图 gsn_csm_xy ( wks [1] : graphic, x : numeric, y : numeric, res [1] : logical ) return_val [1] : graphic 7 gsn_xy 创建并绘制一个在给 function gsn_xy ( 定的工作站XY坐标图 wks [1] : graphic, x : numeric, y : numeric, res [...
When I call one of the gsn_csm_xxxx_map plotting scripts, I get an error message about a units attribute not being correct. Im trying to create a contour, vector, or contour plot, and getting a weird error about spline approximation. When I print something in NCL, I get an error ...
图形是通过左上角地位的。(但是X轴的0点是从左边,Y轴的0点是从下边。所以左上角的点是(0.0,1.0))知识拓展:gsn_csm* 函数与gsn函数的区别。gsn:getting started using NCL csm:climate system Model.gsn_csm函数:自动识别经纬度。格点tickmark从里到外。自动添加colorbar。自动添加标题。
gsn_panel(wks, plot) gsn_frame(wks) end ``` 上面的代码首先加载了NCL的一些常用函数和库,然后定义了x和y两个变量,并赋予它们一些值。接下来,我们创建了一个绘图工作空间(wks),并定义了一些绘图参数(res)。然后,使用gsn_csm_xy函数绘制了一条简单的曲线图,并使用gsn_panel和gsn_frame函数将图形保存到文件...