[ncl-talk] add tickmarks on y-axes in conjunction with gsn_attach_plots
Mary Haley
haley at ucar.edu
Wed May 16 10:39:31 MDT 2018
Dear Harald,
I looked into this, and discovered a bug that would keep you from being
able to customize the axes in the way you want.
The bug will be fixed in NCL V6.5.0, but I've attached a fix that should
work. I've also attached a sample script to show how to do what I think
you're asking.
To get the fix, you need to load the fixed script
with:
load "gsn_attach_plots_fix.ncl"
--Mary
On Wed, May 16, 2018 at 7:09 AM, Rybka Harald <harald.rybka at exch.dwd.de>
wrote:
> 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
>
>
> _______________________________________________
> 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/20180516/2bc9fe2f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gsn_attach_plots_fix.ncl
Type: application/octet-stream
Size: 26071 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180516/2bc9fe2f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy_attach.png
Type: image/png
Size: 85688 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180516/2bc9fe2f/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xy_attach.ncl
Type: application/octet-stream
Size: 1670 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180516/2bc9fe2f/attachment-0001.obj>
More information about the ncl-talk
mailing list