[ncl-talk] switch from manual to automated contour levels in panels
Jack Ogaja
jack.ogaja at gmail.com
Thu Aug 27 09:17:26 MDT 2015
Thanks. I didn’t see that. Mira should try that then.
Jack
> On 27 Aug 2015, at 16:01, Alan Brammer <abrammer at albany.edu> wrote:
>
> cnLevelSpacingF still applies jn AutomaticLevels. That is the resource you want to delete if you want NCL to also choose the spacing as well as the min/max levels. You don't need to delete the selectionMode before resetting it. See below for the documentation on cnLevelSpacingF.
> https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF>
>
>
> cnLevelSpacingF
> When the cnLevelSelectionMode <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode> is ManualLevels or when the cnLevelSelectionMode <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode> is AutomaticLevels, andcnLevelSpacingF <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF> is explicitly set, cnLevelSpacingF <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF> determines the spacing between contour intervals. Otherwise, theContourPlot <https://www.ncl.ucar.edu/Document/HLUs/Classes/ContourPlot.shtml> object sets the value of cnLevelSpacingF <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF> based on the contour levels actually chosen. When thecnLevelSelectionMode <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSelectionMode> is ExplicitLevels, cnLevelSpacingF <https://www.ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnLevelSpacingF> will be set to the arithmetic average of the spacing between levels.
> Default: 5.0
>
>
> On Thu, Aug 27, 2015 at 7:35 AM, Jack Ogaja <jack.ogaja at gmail.com <mailto:jack.ogaja at gmail.com>> wrote:
> Try,
>
> delete(qfres at cnLevelSelectionMode) ;<=== Delete the resource before resetting
> qfres at cnLevelSelectionMode = “AutomaticLevels"
>
> Jack
>
> > On 27 Aug 2015, at 05:01, mberdahl at envsci.rutgers.edu <mailto:mberdahl at envsci.rutgers.edu> wrote:
> >
> > Hi all,
> >
> > I'm trying to make a 3-panel plot, where the top two panels have user
> > define contour intervals (which I can make work, I think), but the bottom
> > panel I'd like to have automatically generated. The way I've tried is to
> > simply change the setting the LevelSelectionMode back to "AutomaticLevels"
> > before calling that final plot, but it doesn't seem to change back to
> > being automatic. Here is a snippet of my code showing how I try to do
> > this. Any recommendations on how to switch between different modes for
> > automatic and manual contour selection for different panels is greatly
> > appreciated.
> >
> > Best,
> > Mira
> >
> >
> >
> >
> > qfres at cnLevelSelectionMode = "ManualLevels" ; set contour levels manually
> > qfres at cnMinLevelF = 0. ; set hte min contour level
> > qfres at cnMaxLevelF = 1. ; set the max contour level
> > qfres at cnLevelSpacingF = 0.1 ; set the contour interval
> >
> >
> > contour_qf_hi = gsn_csm_contour(wks,qAvgTime_hi,qfres)
> > contour_qf_lo = gsn_csm_contour(wks,qAvgTime_lo,qfres)
> >
> > plot(0) = gsn_csm_contour(wks,qAvgTime_hi,qfres)
> > plot(1) = gsn_csm_contour(wks,qAvgTime_lo,qfres)
> >
> > qfres at cnLevelSelectionMode = "AutomaticLevels" ; set it back to automatic
> > level contour spacing for the difference plot.
> > contour_qf_diff = gsn_csm_contour(wks,diff_q,qfres)
> > plot(2) = gsn_csm_contour(wks,diff_q,qfres)
> >
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>
> _______________________________________________
> 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/20150827/3bbb7196/attachment.html
More information about the ncl-talk
mailing list