[ncl-talk] Problem with plot orientation

Soumik Basu sbasu at alaska.edu
Mon Jun 19 15:23:38 MDT 2017


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
website: http://soumikbasu.weebly.com/

***************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170619/4576e480/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cyclone_density_diff_all_model.pdf
Type: application/pdf
Size: 1156643 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170619/4576e480/attachment-0001.pdf 


More information about the ncl-talk mailing list