; ; File: test_DrawGrid.ncl ; ; Author: D. Adriaansen ; ; Date: 12 Jan 2012 ; ; Purpose: Demonstrate potential error in error messages from DrawGrid ; ; Notes: ;________________________________________________________________________ ; NCL libraries load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" ; Generate an x array x = ispan(1,100,1) ; Generate a y array y = fspan(1,10,100) ; Open a workstation wks = gsn_open_wks("png","error_test.png") gsn_define_colormap(wks,"rainbow+white+gray") ; Resources for plotting res = True res@gsnFrame = False res@gsnDraw = False res@gsnMaximize = True ; Gridline resources res@tmXMajorGrid = True res@tmYMajorGrid = True ; Tickmark resources res@tmXBOn = False res@tmXTOn = True res@tmYROn = False res@tmYLOn = False ; Plot the data plot = gsn_csm_xy(wks,x,y,res) ; Draw the plot draw(plot) ; Advance the frame frame(wks)