<div dir="ltr"><div>Hello All,</div><div>             <b>Please have a look at the data and below given script, it is not resulting into overlay.</b></div><div><br></div><div><br></div>begin<br> a=addfile("HP_Temp.nc","r")<br> tmean=a->tmean(:,0,0)<br> tmin=a->tmin(:,0,0)<br> tmax=a->tmax(:,0,0)      ; read in right variable (y2)<br> tmean_time=a->time(0:66)         ; this is our x<br> ;---Convert to fractional years for easier plotting.<br> time=cd_calendar(tmean_time,4)     ; scale for convenience<br>;---Start the graphics<br> wks = gsn_open_wks("png","xy")        ; send graphics to PNG file<br>;---Plotting options for time series plot<br> res       = True<br> res@gsnMaximize = True<br> res@gsnDraw   = False    ; Will draw later, after overlaying<br> res@gsnFrame   = False    ; all plots<br> res@vpWidthF   = 0.8     ; Make plots wider<br> res@vpHeightF  = 0.4<br>;---Resources for legend<br> res@pmLegendDisplayMode   = "Always"        ; turn on legend<br> res@pmLegendWidthF     = 0.12          ; Change width and<br> res@pmLegendHeightF     = 0.15          ; height of legend.<br> res@pmLegendOrthogonalPosF = -0.08         ; move up slightly <br> res@lgLabelFontHeightF   = .011          ; change font height<br> res@lgPerimOn        = False         ; no box around<br> res@lgItemOrder       = (/1,0/)        ; reverse legend<br>;---Titles<br> res@tiMainString      = "Temperature"<br> res@tiYAxisString      = "Temp in Deg Celsius"<br>;---Turn off some tickmarks<br> res@tmXTOn         = False   ; bottom off<br> res@tmYROn         = False   ; right off<br> res@xyLineThicknessF    = 2.0    ; default is 1<br> res@xyMonoDashPattern    = True   ; force all solid lines<br>;--------------------------------------------------<br>; The time_axis_label function adds additional<br>; resources to "res" to produce nicely-formatted<br>; time labels on X axis. This function only works<br>; if you have a time "units" recognized by the<br>; cd_calendar function.<br>;---------------------------------------------------<br>;---Set resources for colors and labels<br> colors1 = (/"blue","red"/)<br> colors2 = (/"darkgreen","darkorange"/)<br> colors3 = (/"brown","purple"/)<br> labels1 = "Tmean"<br> labels2 = "Tmax"<br> labels3 = "Tmin"<br>;---Create the four XY plots<br> res@xyLineColors      = colors1<br> res@xyExplicitLegendLabels = labels1<br> res@pmLegendParallelPosF  = 0.15<br> plot1 = gsn_csm_xy(wks,time,tmean,res)<br> res@xyLineColors      = colors2<br> res@xyExplicitLegendLabels = labels2<br> res@pmLegendParallelPosF  = 0.37<br> plot2 = gsn_csm_xy(wks,time,tmax,res)<br> res@xyLineColors      = colors3<br> res@xyExplicitLegendLabels = labels3<br> res@pmLegendParallelPosF  = 0.59<br> plot3 = gsn_csm_xy(wks,time,tmax,res)<br>;---Overlay one plot on the other, so they become one plot.<br> overlay(plot1,plot2)<br> overlay(plot1,plot3)<br> draw(plot1)       ; This will draw all four plots<br> frame(wks)<br>end<div><br></div><div><br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><font size="4">Regards,</font></div><div><br></div><div><img src="https://docs.google.com/uc?export=download&id=1flpEpH50fxgPRxFvuyiLu2A70K0UoFx-&revid=0Byj9ykpbAx3od3R4N016WWh0MnlGQ1JHUTg4Nk5HVmVMS2ZNPQ" width="304" height="116"><br></div><div>                          <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>