DKRZ PyNGL example map with orthographic projection#
Example:
import Ngl
#-- open workstation
wks = Ngl.open_wks("png","plot_map_orthographic")
#-- resource settings
mpres = Ngl.Resources() #-- resource object
mpres.vpWidthF = 0.8 #-- width of plot
mpres.vpHeightF = 0.8 #-- height of plot
mpres.mpFillOn = True #-- map fill on
mpres.mpOceanFillColor = "Transparent" #-- default: dark blue
mpres.mpLandFillColor = "Gray90" #-- default: dark red
mpres.mpInlandWaterFillColor = "Transparent" #-- default: white
mpres.mpProjection = "Orthographic" #-- projection type
mpres.tiMainString = "Orthographic projection" #-- title
#-- create the plot
map = Ngl.map(wks,mpres)
Ngl.end()
Result: