[ncl-talk] Error: gsn plot: All of the plots passed to gsn_panel appear to be invalid
Ipshita Majhi
ipmajhi at alaska.edu
Wed Aug 6 17:45:17 MDT 2014
Hi,
I am trying to plot 12 plots in one panel. Each column with 4 plots and
three columns like that. Here is the code, I would be grateful if you could
tell me where the error is. Thanking you in advance
===========================================
; To plot decadal plots
; ===========================================
;
; Concepts illustrated:
; - Specifying how many plots to draw in each row
; - Left-justifying and centering paneled plots
;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;=============================================
; data processing
;=============================================
x=asciiread("~/Documents/PhD_June_2015/NCL_Moonsoon/Data_output/all_month_decade",(/13,12/),
"float")
year_decadal=ispan(1880,2012,10)
;==============================================
; create plot
;=============================================
wks = gsn_open_wks ("ps", "panel" )
plot = new ( 12 , graphic)
hres = True
hres at gsnDraw = False
hres at gsnFrame = False
hres at tiMainString = "Decadal Mean"
hres at cnLevelSelectionMode = "ManualLevels" ; manual levels
hres at cnMinLevelValF = -10.
hres at cnMaxLevelValF = 10.
hres at cnLevelSpacingF = 2.
;==============================================
; create panel
;=============================================
pres = True
pres at gsnPanelRowSpec = True ; tell panel what order to
plt
gsn_panel(wks,plot,(/4,4,4/),pres)
pres at gsnPanelCenter = False
gsn_panel(wks,plot,(/4,4,4/),pres)
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140806/ed7aae0c/attachment.html
More information about the ncl-talk
mailing list