[ncl-talk] panel plot with 2 color bars for each plot ( and common color bars)

Ioana Colfescu ioana.colfescu at ed.ac.uk
Fri Nov 6 06:53:24 MST 2015


Hi,
I'm trying to do a panel plot in which I want to use 2 different color 
bars in each plot in the panel.
I do get the plots but I have a problem with the color bars: I'd like to 
deactivate the individual color bars ( for each plot) and have the color 
bars as panel plot color bars - i.e one horizontal ( like in the plot ) 
and one vertical ( the second one which doesn't show up) but what I get 
is the result attached.

Could someone please tell me what should I change in my script to make:
- the individual color bars disappear for each plot
-  the second panel plot color bar appear to the left ( the vertical bar)
I tried to set both the individual or panel resources for plotting the 
bar to False/True but doesn't work.
I attached the plot and the code. Thanks.
Ioana

Relevant code part:


   plot = new(12,graphic)
   res                       = True
   res at gsnDraw               = False    ; turn off draw
   res at gsnFrame              = False    ; turn off frame
  ............................
*  res at lbLabelBar    = False*
   tres                       = res
   dres                       = res
   tres at cnFillPalette         = "BlWhRe"
*tres at lbLabelBar    = False*
   tres at lbOrientation         = "horizontal"
   tres at mpFillOn              = False               ; turn off map fill
   tres at cnLevelSelectionMode  = "ManualLevels"
   tres at cnMinLevelValF       = -0.03                ; set min contour level
   tres at cnMaxLevelValF       =  0.03               ; set max contour level
   tres at cnLevelSpacingF      =  0.005
*cmap_r              = read_colormap_file("NCV_manga")**
**  dres at cnFillPalette  = cmap_r*
*d**res at lbLabelBar    = False*
   dres at cnLevelSelectionMode  = "ManualLevels"
   dres at mpShapeMode  = "FreeAspect"
   kk=0
   ll=1
   do ii=0,5
   plot(kk) = gsn_csm_contour_map(wks,cont1(ii,:,:),tres)
   newvar=new((/dimsizes(cont1)/),typeof(cont1))
   newvar(ii,:,:)=agcms1 at _FillValue
   newvar(ii,{-25:25},:)=cont1(ii,{-25:25},:)
   ter_plot = gsn_csm_contour(wks,newvar(ii,:,:)*100,dres)
   overlay(plot(kk),ter_plot)
   plot(ll) = gsn_csm_contour_map(wks,aagcm1(ii,:,:),tres)
   newvar2=new((/dimsizes(aagcm1)/),typeof(aagcm1))
   newvar2(ii,:,:)=aagcm1 at _FillValue
   newvar2(ii,{-25:25},:)=aagcm1(ii,{-25:25},:)
   ter_plot2 = gsn_csm_contour(wks,newvar2(ii,:,:)*100,dres)
   overlay(plot(ll),ter_plot2)
   resP=True
   resP at gsnMaximize         = True         ; large format
*  resP at gsnPanelLabelBar    = True *        ; add common colorbar
   resP at lbLabelAutoStride   = True         ; auto stride on labels
   resP at lbLabelFontHeight  = 0.015
   resP at lbOrientation =   "horizontal"
;  draw(plot)
;  frame(wks)
   gsn_panel(wks,plot,(/6,2/),resP)
   kk=kk+2
   ll=ll+2
   end do
   end

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151106/861920e8/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eofs_global1_ps_-89S-89N-0-360.ps
Type: application/postscript
Size: 580629 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151106/861920e8/attachment-0001.ps 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20151106/861920e8/attachment-0001.pl 


More information about the ncl-talk mailing list