You are here: Home / Services / Data Analysis and Visualization / Visualization / Software / NCL / PyNGL / DKRZ PyNGL example map with orthographic projection

DKRZ PyNGL example map with orthographic projection

This example shows how to create a map using 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:
DKRZ PyNGL example orthographic projection

Document Actions