Map insets
using DelimitedFiles
coast(region=(110,170,-44,-9), proj=:merc, figsize=15, shore=:faint,
borders=(type=2, pen=1), DCW=(country="AU", fill=:bisque),
land=:brown, water=:azure1)
basemap!(inset=(anchor=:TR, width=3.8, offset=(0.4, 0.25), save="xx000"),
box=(fill=:white, pen=1, clearance=0.1, shaded=true))
t = readdlm("xx000"); # x0 y0 w h
coast!(region=:global360, proj=(name=:ortho, center=(120,-30), parallel=t[3]),
land=:brown, area=5000, frame=(grid=:auto,), shore=:faint,
DCW=(country="AU", fill=:bisque), x_off=t[1], y_off=t[2]);
# Determine size of inset map of Europe
tt = mapproject(region=(-15,35,30,48), proj=:merc, figsize=5, map_size=true); # w h
mapW = tt[1].data[1]; mapH = tt[1].data[2]
coast!(region=(-10,5,35,44), proj=:merc, figsize=15,
frame=(axes=:WSne, annot=:auto, ticks=:auto),
DCW=(country="ES", fill=:bisque), land=:brown, shore=:faint,
borders=(type=1,pen=1), water=:azure1, res=:full, x_off=-t[1],
y_off=11.5-t[2], par=(:FORMAT_GEO_MAP, :dddF))
basemap!(inset=(anchor=:TR, size=(mapW, mapH), offset=(0.4, 0.25),save="xx000"),
box=(fill=:white, pen=1, clearance=0.1, shaded=true))
t = readdlm("xx000"); # x0 y0 w h
coast!(region=(-15,35,30,48), proj=:merc, figsize=t[3], land=:brown,
frame=:bare, DCW=(country="ES", fill=:bisque), par=(:MAP_FRAME_TYPE, :plain),
x_off=t[1], y_off=t[2], show=true)
rm("xx000")
See also GMT ex44