GMT powered automatic maps

automap

class Map(gmtversion='newest', **kwargs)[source]

Undocumented.

lat

float, optional

lon

float, optional

radius

float, optional

width

float, default: 20.0

height

float, default: 14.0

margins

list of float objects, default: []

illuminate

bool, default: True

skip_feature_factor

float, default: 0.02

show_grid

bool, default: False

show_topo

bool, default: True

show_scale

bool, default: False

show_topo_scale

bool, default: False

show_center_mark

bool, default: False

show_rivers

bool, default: True

show_plates

bool, default: False

show_plate_velocities

bool, default: False

show_plate_names

bool, default: False

show_boundaries

bool, default: False

illuminate_factor_land

float, default: 0.5

illuminate_factor_ocean

float, default: 0.25

color_wet

tuple of 3 int objects, default: (216, 242, 254)

color_dry

tuple of 3 int objects, default: (172, 208, 165)

color_boundaries

tuple of 3 int objects, default: (1, 1, 1)

topo_resolution_min

float, default: 40.0

minimum resolution of topography [dpi]

topo_resolution_max

float, default: 200.0

maximum resolution of topography [dpi]

replace_topo_color_only

FloatTile, optional

replace topo color while keeping topographic shading

topo_cpt_wet

str, default: 'light_sea'

topo_cpt_dry

str, default: 'light_land'

topo_dry_path

str, optional

topo_wet_path

str, optional

axes_layout

str, optional

custom_cities

list of City objects, default: []

gmt_config

dict of str objects, default: {}

comment

str, optional

approx_ticks

int, default: 4

save(outpath, resolution=75.0, oversample=2.0, size=None, width=None, height=None, psconvert=False, crop_eps_mode=False)[source]

Save the image.

Save the image to outpath. The format is determined by the filename extension. Formats are handled as follows: '.eps' and '.ps' produce EPS and PS, respectively, directly with GMT. If the file name ends with '.pdf', GMT output is fed through gmtpy-epstopdf to create a PDF file. For any other filename extension, output is first converted to PDF with gmtpy-epstopdf, then with pdftocairo to PNG with a resolution oversampled by the factor oversample and finally the PNG is downsampled and converted to the target format with convert. The resolution of rasterized target image can be controlled either by resolution in DPI or by specifying width or height or size, where the latter fits the image into a square with given side length. To save transparency use psconvert=True. To crop the output image with a rectangle to the nearest non-white element set crop_eps_mode=True.