Example #1
0
shaded = options.shaded
singlerow = options.singlerow
singlecolumn = options.singlecolumn
relative = options.relative
rasterized = options.rasterized
tol = options.tol
varname = options.varname
shape_filename = options.shape_filename

cmap = None
if colormap is not None:
    try:
        cdict = plt.cm.datad[colormap]
    except:
        # import and convert colormap
        cdict = ppt.gmtColormap(colormap)
    cmap = colors.LinearSegmentedColormap("my_colormap", cdict)

# check output format
suffix = out_file.split(".")[-1]
if suffix not in ("png", "pdf", "ps", "eps", "svg"):
    print(
        ("Requested output format %s not supported, try png, pdf, svg, ps, eps"
         % suffix))
    import sys.exit

    sys.exit

# set constants and other stuff
geotiff_rasterized = True
Example #2
0
out_file = options.out_file
shaded = options.shaded
singlerow = options.singlerow
singlecolumn = options.singlecolumn
relative = options.relative
rasterized = options.rasterized
tol = options.tol
varname = options.varname

cmap = None
if colormap is not None:
    try:
        cdict = plt.cm.datad[colormap]
    except:
        # import and convert colormap
        cdict = ppt.gmtColormap(colormap)
    cmap = colors.LinearSegmentedColormap('my_colormap', cdict)

# check output format
suffix = out_file.split('.')[-1]
if suffix not in ('png', 'pdf', 'ps', 'eps', 'svg'):
    print(('Requested output format %s not supported, try png, pdf, svg, ps, eps'
           % suffix))
    import sys.exit
    sys.exit

vars_speed = ('csurf', 'cbase', 'cbar', 'magnitude', 'balvelmag', 'surfvelmag', 'velbase_mag',
              'velsurf_mag', 'velshear_mag')
vars_dem = ('thk', 'usurf', 'usrf', 'surface_altitude',
            'surface', 'land_ice_thickness')
vars_topo = ('topg', 'bedrock_altitude', 'bed')
Example #3
0
    'bed',
    '$u_{c}$',
    'O',
    'K',
    'Hm',
    'E$_{\mathregular{ssa}}$',
    'B',
    'f')
params_abbr_dict = dict(zip(params, params_abbr))


try:
    cdict = plt.cm.datad[colormap]
except:
    # import and convert colormap
    cdict = ppt.gmtColormap(colormap)
cmap = colors.LinearSegmentedColormap('my_colormap', cdict)

# Init Unit system
sys = System()

# Plotting styles
axisbg = '0.9'
shadow_color = '0.25'
numpoints = 1

aspect_ratio = golden_mean

# set the print mode
lw, pad_inches = ppt.set_mode(print_mode, aspect_ratio=aspect_ratio)