<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#
# Contour plot exercise 4.
#
import Ngl                  # Import needed modules

z = Ngl.generate_2d_array([40,40],15,15,-10.,110.)

wks = Ngl.open_wks("x11","contour_ex04")  # Open an X11 window

res                      = Ngl.Resources()   # Contour options desired

res.cnLevelSelectionMode = "ManualLevels"    # Manually set contour levels.
res.cnMinLevelValF       =  5.
res.cnMaxLevelValF       = 95.
res.cnLevelSpacingF      =  5.

res.cnFillOn             = True           # Turn on contour fill
res.cnLinesOn            = False          # Turn off contour lines
res.cnLineLabelsOn       = False          # Turn off contour line labels

res.tiMainString         = "~F26~This is a purple bold times-roman title"
res.tiMainFontColor      = "Purple4"

res.nglPointTickmarksOutward = True

plot = Ngl.contour(wks,z,res)

Ngl.end()

</pre></body></html>