[ncl-talk] 2nd y-axis label plus...

Marston Johnston shejo284 at gmail.com
Mon May 25 00:15:56 MDT 2015


Hi,

I’m trying to complete this figure by making some cosmetic changes.
I thought these would be rather easy but I’m missing something. What I would like to do are:

1.) Move the plots closer vertically and remove the y-axis labels. 
2.) I added a y2-axis title on the right side of the right column plots. How do I get these to show up? 
I’ve tried using the tmYLLabelsOn but this doesn’t give me the changes I need. I suspect something is interfering.

Would appreciate some advice on this.

Thanks in advance!
/M


plot snip…..

wks = gsn_open_wks("pdf","zmean_xy")
  plot = new(4,graphic)
  data = new((/3,dimsizes(djfzm&lat)/),double)

  res = True
  resR                = True 

  res at gsnFrame        = False   
  res at gsnDraw         = False   
  res at xyLineThicknesses = (/2.0,2.0,2.0/)      
  res at xyLineColors      = (/"blue","red","black"/)

  resR at trYMinF = -4
  resR at trYMaxF = 30
  res at trYMinF = 180
  res at trYMaxF = 300
  
  ; add a legend
  res at pmLegendDisplayMode    = "Always"              ; turn on legend
  res at pmLegendSide           = "Top"                 ; Change location of
  res at pmLegendOrthogonalPosF = -0.65     ; Move into plot
  res at pmLegendParallelPosF   = 0.35       ; Move to right
  res at pmLegendWidthF         = 0.2       ; Decrease width
  ;res at pmLegendHeightF        = 0.1       ; Decrease height
  res at lgBoxMinorExtentF      = 0.2       ; Shorten the legend lines
  res at lgLabelFontHeightF     = 0.02     ; Change the font size
  res at lgPerimOn              = False                 ; no box around
  res at xyExplicitLegendLabels = (/"EC-Earth","NOAA18"/)
  
  resR at xyLineThicknesses          = 2.                  ; thicker line
  
  ; GRID lines
  res at tmXMajorGrid                = True          ; implement x grid 
  res at tmXMajorGridThicknessF      = 1.0           ; 2.0 is default
  res at tmXMajorGridLineDashPattern = 2             ; select short dash lines
  resR at tmYMajorGrid                = True          ; implement y grid
  resR at tmYMajorGridThicknessF      = 1.0           ; 2.0 is default
  resR at tmYMajorGridLineDashPattern = 2             ; select short dash lines
  
  res at tiYAxisString  = "Brightness Temperature [K]" ; y-axis title
  ;res at tmXBLabelsOn         = False              ; do not draw bottom labels
  ;resR at tmYRLabelsOn        = False              ; no right labels
  ;res at tmYLLabelsOn         = True   
  data(0,:) = djfzm
  data(1,:) = djfozm
  data(2,:) = djfzm - djfozm
  plot(0) = gsn_csm_xy2 (wks,djfzm&lat,data(0:1,:),data(2,:),res,resR)

  ;**************************
  res at pmLegendDisplayMode = "Never"
  res at tiYAxisString = "" ; y-axis title
  ;res at tmYLLabelsOn  = False             ; left labels
  
  resR at tiYAxisString = "EC-Earth - NOAA18 [~F33~D K]" ; y2-axis title
  ;resR at tmYRLabelsOn  = True              ; right labels

  data(0,:) = mamzm
  data(1,:) = mamozm
  data(2,:) = mamzm - mamozm
  plot(1) = gsn_csm_xy2 (wks,mamzm&lat,data(0:1,:),data(2,:),res,resR)
 
  res at tiYAxisString  = "Brightness Temperature [K]" ; y-axis title
  resR at tiYAxisString  = "" ; y-axis title
  res at tiXAxisString  = "Latitude" ; x-axis title
  ;res at tmXBLabelsOn         = True              ; draw bottom labels
  ;resR at tmYRLabelsOn        = False           ; right labels
  ;res at tmYLLabelsOn         = True              ; left labels
  data(0,:) = jjazm
  data(1,:) = jjaozm
  data(2,:) = jjazm - jjaozm
  plot(2) = gsn_csm_xy2 (wks,jjazm&lat,data(0:1,:),data(2,:),res,resR)
  
  res at tiYAxisString  = "" ; y-axis title
  resR at tiYAxisString  = "EC-Earth - NOAA18 [~F33~D K]" ; y2-axis title
  res at tiXAxisString  = "Latitude" ; x-axis title
  ;res at tmYRLabelsOn         = True              ; right labels
  ;res at tmYLLabelsOn         = False              ;left labels
  ;resR at tmYRLabelsOn        = True 
  data(0,:) = sonzm
  data(1,:) = sonozm
  data(2,:) = sonzm - sonozm
  plot(3) = gsn_csm_xy2 (wks,sonzm&lat,data(0:1,:),data(2,:),res,resR)
  
  resP                           = True
  resP at gsnMaximize  = True 
  gsn_panel(wks,plot,(/2,2/),resP)

***************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marston S. Johnston, PhD
Department of Earth Sciences
University of Gothenburg, Sweden
Email: marston.johnston at gu.se <mailto:marston.johnston at gu.se> 
Phone: +46-31-7862859 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Only the fruitful thing is true!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150525/3cf9a876/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zmean_xy.pdf
Type: application/pdf
Size: 187691 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150525/3cf9a876/attachment.pdf 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150525/3cf9a876/attachment-0001.html 


More information about the ncl-talk mailing list