[ncl-talk] plotting two variables in the same plot.

Dennis Shea shea at ucar.edu
Sun Aug 21 08:45:58 MDT 2016


By default,  'gsn_csm_contour' draws and plots each frame.

The panel page:
   http://www.ncl.ucar.edu/Applications/panel.shtml

  Res at gsnDraw  = False           ; don't draw
  Res at gsnFrame = False           ; don't advance frame

...
One approach:

    Plot = new( 2, "graphic)
    Plot(0) =   gsn_csm_contour(Wks_NPIX_FIX,RF_NPIX_FIX,Res)
    [snip]
    PLot(1) =   gsn_csm_contour(Wks_NPIX_FIX,RF_NPIX_FIX,Res)

;************************************************
  resP                                = True                 ; modify the
panel plot
  resP at gsnMaximize        = True                 ; make large: ps, pdf, eps
; resP at gsnPanelMainString = "A common title"     ; new resource added in
NCL V6.4.0
  resP at txString           = "A common title"     ; use this for NCL V6.3.0
and earlier

  gsn_panel(wks,Plot,(/2,1/),resP)               ; vertical
  gsn_panel(wks,Plot,(/1,2/),resP)               ; horizontal
~

On Sun, Aug 21, 2016 at 7:55 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> I am plotting the orbital data (rain rate) from TRMM. In this data, lat
> and lon are itself 2 dim.
> Rainrate is a 3 dim variable and is varying as per nscan (data along the
> swath, 9248), npix (49), and nlevel (80).
>
> I have extracted all the points within a domain (5-20N/72-84E) which
> exceed a rain rate of 30mm/hr.
> I got a number of adjacent points where the rain rate is exceeding the
> above mentioned threshold (RF.txt20080402 file attached. 1st column is rain
> rate, 2nd column is NSCAN, 3rd column is NPIX and 4th column is NLEVEL.
>
> I been able to get a plot of height vs longitudes (nscan) for a fixed
> point (say 2870/26 where 2870 is nscan and 26 is the npix for which
> rainrate is more than 30mm/hr..plot attached).
>
> Now I wish to add ht vs longitude plot for the adjacent point say 2871/26
> too in the SAME plot.
> But two separate plots are created. I dont know how to go about doing
> this.
>  Pls suggest.
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160821/3c8bd746/attachment.html 


More information about the ncl-talk mailing list