Maps for https://mexico.werthmuller.org/besucherreisen/comalcalcoundpalenque.
In [1]:
import travelmaps2 as tm
In [2]:
tm.setup(dpi=200)
In [3]:
fig_x = tm.plt.figure(figsize=(tm.cm2in([11, 6])))
# Locations
MDF = [19.433333, -99.133333] # Mexico City
MAL = [18.948333, -99.494722] # Malinalco
TUL = [20.200278, -87.433611] # Tulum
CHI = [20.683056, -88.568611] # Chichén Itzá
CAN = [21.160556, -86.8475] # Cancún
PLA = [20.6275, -87.081111] # Playa del Carmen
# Create basemap
m_x = tm.Basemap(width=3500000, height=2300000, resolution='c', projection='tmerc', lat_0=24, lon_0=-102)
# Plot image
m_x.warpimage('./data/TravelMap/HYP_HR_SR_OB_DR/HYP_HR_SR_OB_DR.tif')
# Put a shade over non-Mexican countries
countries = ['USA', 'BLZ', 'GTM', 'HND', 'SLV', 'NIC', 'CUB']
tm.country(countries, m_x, fc='.8', ec='.3', lw=.5, alpha=.6)
# Fill states
fcs = 32*['none']
ecs = 32*['k']
lws = 32*[.2,]
tm.country('MEX', bmap=m_x, fc=fcs, ec=ecs, lw=lws, adm=1)
ecs = 32*['none']
ecs[14] = 'c'
ecs[22] = 'r'
ecs[30] = 'm'
lws = 32*[1,]
tm.country('MEX', bmap=m_x, fc=fcs, ec=ecs, lw=lws, adm=1)
# Add visited cities
tm.city(MAL, 'Malinalco', m_x, offs=[0, -1.5], halign="center")
tm.city(MDF, 'Mexiko-Stadt', m_x, offs=[.5, 1], halign="right")
tm.city(CAN, 'Cancun', m_x, offs=[-0.5, 1], halign="center")
tm.city(TUL, 'Tulum', m_x, offs=[0, -1.5], halign='center')
tm.city(CHI, 'Chichen\nItza', m_x, offs=[-5, -0.5], halign='left')
#tm.city(PLA, 'Playa del Carmen', m_x)#, offs=[0, -2])
# Save-path
fpath = '../mexico.werthmuller.org/content/images/mami/'
tm.plt.savefig(fpath+'MapMami.png', bbox_inches='tight')
tm.plt.show()