<div dir="ltr"><div>Ohh god! How can I forget it? Sorry to bother you and Thanks a lot Dr. Karin to let me know about the range. It is fine now.😄</div><br><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><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 13, 2019 at 6:27 PM Karin Meier-Fleischer via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    Hi Atul,<br>
    <br>
    your value range is wrong. You can use the printMinMax function to
    see the data range of the variables.<br>
    <br>
    <tt><font color="#3333ff">  printMinMax(tmean,0)<br>
          printMinMax(tmin,0)<br>
          printMinMax(tmax,0)</font></tt><tt><br>
    </tt><br>
    Returns<br>
    <br>
    <tt> : min=23.9729   max=25.8099</tt><tt><br>
    </tt><tt> : min=18.8202   max=20.6115</tt><tt><br>
    </tt><tt> : min=28.7211   max=31.7591</tt><br>
    <br>
    Add to the resources<br>
    <br>
    <font color="#3333ff"><tt>  res@trYMinF = 18.</tt><tt><br>
      </tt><tt>  res@trYMaxF = 32.</tt></font><br>
    <br>
    And you define plot2 with variable tmax instead of tmin.<br>
    <br>
    <font color="#3333ff"><tt> plot2 = gsn_csm_xy(wks,time,tmin,res)</tt></font><br>
    <br>
    -Karin<br>
    <br>
    <div>Am 13.11.19 um 13:44 schrieb Atul Saini
      via ncl-talk:<br>
    </div>
    <blockquote type="cite">
      
      <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">
              <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>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
ncl-talk mailing list
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></pre>
    </blockquote>
  </div>

_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>