[ncl-talk] Problem with plot orientation

alesall alesall at iri.columbia.edu
Mon Jun 19 15:26:21 MDT 2017


Hi Soumik,

try commenting out this line:

  res at gsnMaximize                  = True




-- 
Alessandra Giannini
IRI for Climate and Society - The Earth Institute at Columbia University
P.O. Box 1000, Palisades NY 10964-8000
phone/fax: +1 845 680-4473/4864 - email: alesall at iri.columbia.edu <mailto:alesall at iri.columbia.edu>
> On Jun 19, 2017, at 5:23 PM, Soumik Basu <sbasu at alaska.edu> wrote:
> 
> Hello,
> 
> I am trying to make a panel plot of 3 figures. But, whenever I am saving it in .pdf format the plots are appearing in landscape orientation.  
> 
> I tried both @wkOrientation  and @gsnPaperOrientation but none of those worked. 
> 
> I am attaching the plot. Resources for the plot are as follows: 
> 
> ;*************************************************
> ; Plot
> ;*************************************************
>   res                              = True    
>   res at gsnMaximize                  = True
>   res at gsnSpreadColors              = True     
> ;  res at gsnPolar                     = "NH"
>   res at gsnDraw             = False           ; don't draw
>   res at gsnFrame            = False           ; don't advance frame
> 
>   res at cnFillOn                     = True               
>   res at cnLinesOn                    = False  
>   res at cnLevelSelectionMode         = "ManualLevels"           
>   res at cnMinLevelValF               = -5
>   res at cnMaxLevelValF               =  5
>   res at cnLevelSpacingF              = 0.1
>   res at cnLineLabelsOn               = False
> 
>   res at lbLabelStride                = 50   
>   res at lbOrientation                = "horizontal"       ;vertical label bar
>   res at lbLabelBarOn                 = False  
> 
>   res at tmLabelAutoStride            = True
>   res at tmXTOn                       = False
>   res at tmYROn                       = False
>   
>   res at mpLimitMode                  = "LatLon" 
>   res at mpMinLatF                    = 30.
>   res at mpMaxLatF                    = 90.
>   res at mpMinLonF                    = 0.
>   res at mpMaxLonF                    = 150.
>   res at mpCenterLonF                 = 75
>   res at mpGeophysicalLineThicknessF  = 1.5
> 
> 
> 
>   sres                              = True    
>   sres at gsnMaximize                  = True
>   sres at gsnSpreadColors              = True     
>   sres at gsnDraw                      = False                   ; do not draw the plot
>   sres at gsnFrame                     = False    
> 
>   sres at cnFillOn                     = True               
>   sres at cnLinesOn                    = False
>   sres at cnLevelSelectionMode         = "ManualLevels"           
>   sres at cnMinLevelValF               = 0
>   sres at cnMaxLevelValF               = 80
>   sres at cnLevelSpacingF              = 5
>   sres at cnLineLabelsOn               = False
> 
>   sres at lbLabelBarOn                 = False  
>   sres at lbLabelStride                = 5   
>   sres at lbOrientation                = "horizontal"       ;vertical label bar
> 
>   sres at tmLabelAutoStride            = True
>   sres at tmXTOn                       = False
>   sres at tmYROn                       = False
>   
>   sres at mpLimitMode                  = "LatLon" 
>   sres at mpMinLatF                    = 30.
>   sres at mpMaxLatF                    = 90.
>   sres at mpMinLonF                    = 0.
>   sres at mpMaxLonF                    = 150.
>   sres at mpCenterLonF                 = 75
>   sres at mpGeophysicalLineThicknessF  = 1.5
> 
>   
> ;*****************************************************
> ;               Plot
> ;*****************************************************
>   plot1 = new(1,graphic)  
> 
>   wks = gsn_open_wks("x11","cyclone_density_diff_all_model")   
> ;  wks at wkOrientation = "potrait"      
>   gsn_define_colormap(wks,"sunshine_9lev")  
> 
>   plot1(0) = gsn_csm_contour_map_ce(wks,den_mean_ensemble,sres)
> 
>  ;***************************************
> ; panel first plot
> ;***************************************
>   pres1                     = True
>   pres1 at gsnPanelLabelBar    = True       ; common label bar
>   pres1 at gsnFrame            = False      ; don't advance frame yet
>   pres1 at gsnPanelFigureStrings    = (/"HIST"/)
> 
>   pres1 at lbOrientation       = "vertical" ; vertical label bar
>   pres1 at lbBoxLinesOn        = False
> 
> ; we use PanelBottom to tell the plot to only draw in the top part of the page.
> ; since there are two plots here, and we have limited the plot to the upper
> ; 0.4 of the page, each plot will have a size 0.3.
> 
>   pres1 at gsnPanelBottom      = 0.7        ; move bottom up from 0.0 to 0.6
> ;  pres1 at gsnPaperOrientation = "potrait" 
> 
>   pres1 at gsnPanelFigureStringsBackgroundFillColor = -1
>   pres1 at amJust              = "TopRight"
> 
>   gsn_panel(wks,plot1,(/1,1/),pres1)
> 
> ;**************************************
> ; panel next two plots
> ;**************************************
>   plot = new(2,graphic)  
> 
>   gsn_define_colormap(wks,"BlueWhiteOrangeRed")
>   
>   plot(0) = gsn_csm_contour_map_ce(wks,den_diff_ensemble1,res)
>   
>   plot(1) = gsn_csm_contour_map_ce(wks,den_diff_ensemble,res)
> 
>   pres2                     = True
>   pres2 at gsnPanelLabelBar    = True       ; common label bar
>   pres2 at lbLabelStride       = 10   
>   pres2 at gsnPanelTop         = 0.7        ; draw up to the bdry of upper plot
>   pres2 at gsnPanelBottom      = 0.1        ; move bottom up so size is 0.3
>   pres2 at gsnFrame            = False      ; don't advance frame yet
> 
> 
>   pres2 at gsnPanelFigureStrings    = (/"RCP4.5 - HIST","RCP8.5 - HIST"/)
>   pres2 at gsnPanelFigureStringsBackgroundFillColor = -1
> 
>   pres2 at amJust              = "TopRight"
> 
>   pres2 at lbOrientation       = "vertical" ; vertical label bar
>   pres2 at lbBoxLinesOn        = False
> 
>   gsn_panel(wks,plot,(/2,1/),pres2)
> 
> ; now advance frame for all plots
> 
>   frame(wks)
>  
>   end
> 
> Thank you in advance for any help. 
> 
> Thanks,
> Soumik
> 
> -- 
> -- 
> "Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning." - Albert Einstein
> 
> **************************************************************************************************
> Dr. Soumik Basu
> Post Doctoral Fellow, International Arctic Research Center, UAF, Fairbanks, AK, USA
> Nanjing University of Information Science and Technology, Nanjing, China
> PhD in Atmospheric Sciences
> M.Sc. in Atmospheric Sciences
> Email: suvro05 at gmail.com <mailto:suvro05 at gmail.com>
> website: http://soumikbasu.weebly.com/ <http://soumikbasu.weebly.com/>
> 
> ***************************************************************************************************
> <cyclone_density_diff_all_model.pdf>_______________________________________________
> 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/20170619/f1e1fc94/attachment.html 


More information about the ncl-talk mailing list