[ncl-talk] switch from manual to automated contour levels in panels

mberdahl at envsci.rutgers.edu mberdahl at envsci.rutgers.edu
Wed Aug 26 21:01:07 MDT 2015


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)






More information about the ncl-talk mailing list