[ncl-talk] Overlay plots and Panel Plots

Melissa Lazenby M.Lazenby at sussex.ac.uk
Tue Mar 1 06:47:37 MST 2016


Hi All NCL Users

I am having a slight problem trying to draw a panel plot, without intially drawing the 3 plots separately. I have used the function res at gsnDraw = False and res at gsnFrame = False for all my plots so I am not sure why they are plotting beforehand.

The only thing I can think of is that when I overlay the plots they draw then and I am not sure how to stop that.

Below is a snippet of my code that should be relevant to this problem.

I would just like it to output one frame with 3 panel plots in it and currently it is plotting the 3 plots overlaid upon one another  and then the 3 panel plot. I just want the latter.

Many thanks for your help in advance.

Kindest regards
Melissa


   zres at gsnLeftString        = "a.) CMIP5 MME BIAS (qu;qv)"
   plot_a = gsn_csm_contour_map(wks,W4(0,:,:),zres)
   plot_b = gsn_csm_vector(wks,U3(0,:,:),V3(0,:,:),sres)

overlay(plot_a,plot_b)
plot(0)=plot_a

   ures at gsnLeftString        = "b.) BIAS: MME q & obs uv"
   plot_c = gsn_csm_contour_map(wks,speedq(0,:,:),ures)
   plot_d = gsn_csm_vector(wks,uq1q(0,:,:),vq1q(0,:,:),sres)

overlay(plot_c,plot_d)
plot(1)=plot_c

   qres at gsnLeftString        = "c.) BIAS: MME uv & obs q"
   plot_e = gsn_csm_contour_map(wks,speeduv(0,:,:),qres)
   plot_f =gsn_csm_vector(wks,uq1uv(0,:,:),vq1uv(0,:,:),res)

overlay(plot_e,plot_f)
plot(2)=plot_e


  resP            = True                         ; modify the panel plot
  resP at txString   = ""
  resP at gsnPanelLabelBar   = True                ; add common colorbar
  resP at lbTitleOn        =  True                ; turn on title
  resP at lbTitleString    = "g/kg*m/s"                ; title string
  resP at lbTitlePosition  = "Right"              ; title position
  resP at lbTitleFontHeightF= .015                ; make title smaller
  resP at lbTitleDirection = "Across"             ; title direction
  resP at pmLabelBarOrthogonalPosF = 0.075         ; move whole thing down

  resP at lbLabelStride         = 2                 ; skip every other label
  maximize_output(wks,resP)
  resP at cnFillOn             = True               ; color on
  resP at cnInfoLabelOn     = False                ; turn off info label
  resP at gsnPanelRowSpec = True                   ; tell panel what order to plt

  gsn_panel(wks,plot,(/2,1/),resP)


end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160301/433070b5/attachment.html 


More information about the ncl-talk mailing list