Maps for https://mexico.werthmuller.org/besucherreisen/comalcalcoundpalenque.
In [1]:
import travelmaps2 as tm
tm.setup(dpi=200)
In [3]:
fig_x = tm.plt.figure(figsize=(tm.cm2in([11, 6])))
# Locations
MDF = [19.433333, -99.133333] # Mexico City
VIL = [17.986944, -92.919444] # Villahermosa
PAL = [17.509167, -91.982222] # Palenque
COM = [18.271667, -93.224722] # Comalcalco
# 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[4] = 'r'
ecs[26] = 'c'
lws = 32*[1,]
tm.country('MEX', bmap=m_x, fc=fcs, ec=ecs, lw=lws, adm=1)
# Add visited cities
tm.city(COM, 'Comalcalco', m_x, offs=[0, 1], halign="center")
tm.city(MDF, 'Mexiko-Stadt', m_x, offs=[.5, .5], halign="right")
#tm.city(VIL, 'Villahermosa', m_x, offs=[-.5, 1])
tm.city(PAL, 'Palenque', m_x, offs=[0, -2])
# Save-path
#fpath = '../mexico.werthmuller.org/content/images/comalcalcoundpalenque/'
#tm.plt.savefig(fpath+'MapVillahermosa.png', bbox_inches='tight')
tm.plt.show()