Hello,
I want to simply swap the x with the y axis (to have depth on y axis) and I=
can't find code to use anywhere on the website or searching google, can so=
meone help me?
Here is my code:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
;-------------------------------------Temperature--------------------------=
---------------------------------------------------------------------------=
---------------------------------------------------------------------------=
----------------------------
;--------------MPIOM profiles
;----------Coordinate 1
data12 = addfile ("sector_icon_lr_12_mpiom_tho_ym_0000-0099.=
nc", "r")
tho = data12->tho
data = new((/3,dimsizes(tho&depth)/),float)
data(0,:) = tho(1,:,{-30},{-48})
data(1,:) = tho(10,:,{-30},{-48})
data(2,:) = tho(50,:,{-30},{-48})
variables = getfilevarnames(data12)
print(variables)
wks = gsn_open_wks("x11", "T_Profile_48W30S")
res = True
res@xyLineColors = (/"blue","red","green"/) ; change line=
color
res@xyLineThicknesses = (/2.0,2.0,2.0/)
res@xyDashPattern = 0
res@pmLegendDisplayMode = "Always"
res@lgPerimOn = False
res@lgLabelFontHeightF = .015
res@pmLegendHeightF = 0.1
res@xyExplicitLegendLabels = (/"t = 1","t = 10","t = 50"/)
res@tiMainString = "Temperature with depth at 30S 48W for differen=
t times"
profile = (/tho&depth/)
plot = gsn_csm_xy(wks,profile,data,res)
thanks,
Michael
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 19 09:01:23 2014
This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT