[ncl-talk] add tickmarks on y-axes in conjunction with gsn_attach_plots

Rybka Harald harald.rybka at exch.dwd.de
Wed May 16 07:09:13 MDT 2018


Hi,

I have a question concerning tickmarks on y-axes and attaching plots 
with "gsn_attach_plots" procedure.

I want to create three pdf plots next to each other (attaching on the 
y-axis, see attached file) but instead of removing the border between 
the plots (or having it as a straight line) it would be great to have 
the possibility to show the tickmarks (without labels) on these axes 
between the plots. Is there a way to set up the axis resources so that 
this is possible? Preferably, I would like to have tickmarks between the 
borders which are located inward and outward at the same time.

Below are the relevant lines of my ncl-script to produce the attached 
image. I have not been able to get it to work as described above...

Any ideas?

-- Harald

/FilePath  = plotdir + FileName
wks = gsn_open_wks(wks_type,FilePath)

   ; set resources
   res = True
   res at gsnFrame = False
   res at gsnDraw  = False

   res at tmXTBorderOn     = False
   res at tmXTOn           = False
   res at tmYRBorderOn     = False
   res at tmYROn           = False
   res at xyLineThicknessF = 2.5

   res at trXMinF = 0
   res at trXMaxF = 14.99

   res at tiXAxisString = "PDF in %"
   res at tiYAxisString = "cloud bottom height in m"

;  res at gsnXYBarChart            = True              ; create bar plot
;  res at gsnXYBarChartOutlineOnly = True

   noplt = 3
   plot_obs = new((/noplt/),graphic) ; create a plot array

   plot_obs(0) = gsn_csm_xy (wks, zcb_pdf1, zcb_pdf1 at bin_center, res)
/

/  res1=res/

/  res1 at tmYLLabelsOn = False
/

/  plot_obs(1) = gsn_csm_xy (wks, zcb_pdf2, zcb_pdf2 at bin_center, res1)
   plot_obs(2) = gsn_csm_xy (wks, zcb_pdf3, zcb_pdf3 at bin_center, res1)

   res at gsnAttachBorderOn = False
   plobs = 
gsn_attach_plots(plot_obs(0),(/plot_obs(1),plot_obs(2)/),res,res1)

   draw(plot_obs(0))
   frame(wks)/

-- 
________________________________________________________
Forschung und Entwicklung (FE14)
Frankfurter Straße 135
63067 Offenbach am Main
E-Mail: harald.rybka at dwd.de     Tel.: +49(69) 8062-2225
- Wissenschaftlicher Mitarbeiter HD(CP)²-Projekt -
Website: www.hdcp2.eu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180516/e568f6c8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdf_cbh.png
Type: image/png
Size: 13821 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180516/e568f6c8/attachment.png>


More information about the ncl-talk mailing list