Line networks, map embellishments, and curved titles
loc = [-157.8583 21.3069 61 300
-149.5585 -17.5516 -120 120
139.6917 35.6895 56 170
-70.6693 -33.4489 215 322
151.2070 -33.8675 -10 145
-118.2437 34.0522 142 306]
par = [["HNL" "BC" "0.6i"]; ["PPT" "TC" "0.6i"]; ["HND" "RB" "0.3i"];
["SCL" "TL" "0.25i"]; ["SYD" "TR" "0.85i"]; ["LAX" "BL" "0.80i"]]
makecpt(cmap=:lightgray, range="-12000,12000")
grdimage("@etopo10m_48.nc", region=:global360, shade=(azim=45, norm="t2"),
proj=(name=:ortho, center=(205,-10)), figsize=18)
near_area = sphtriangulate(loc, voronoi=:v)
t_cpt = makecpt(cmap=:categorical, range=(0,6,1))
plot!(near_area, close=true, cmap=t_cpt, alpha=65)
plot!(loc, marker=:W, ms="2000k", fill="white@40")
coast!(land=:black, area=500, frame=(annot=:auto, ticks=:auto, grid=:auto))
# Make a 15 degrees by 250 km spiderweb grid around each airport
# First to the arcs of different radii
for k in 500:250:2000
plot!(loc, marker="W" * "$k" * "k+a", ml=0.5)
end
# Then do every 15 degree radial lines but in multiples of 15. Also place labels.
daz=15
for k = 1:size(loc,1)
az1 = ceil(loc[k,3] / daz) * daz
az2 = floor(loc[k,4] / daz) * daz
# Generate the radial lines at 15 deg and plot them as geovectors
a15 = az1:daz:az2
t = zeros(length(a15), 4); t .+= [loc[k,1] loc[k,2] 0 2000]; t[:,3] = a15
arrows!(t, geovec=0.1, pen=0.5)
text!(text_record(loc[k:k,1:2], par[k,1]),
offset=(corners=true, shift=par[k,3], line=(0.5,:white)),
font=16, justify=par[k,2], noclip=true)
text!(text_record(loc[k:k,1:2], par[k,1]),
offset=(corners=true, shift=par[k,3], line=0.25),
font=16, justify=par[k,2], noclip=true, fill=:white, pen=0.25)
end
# Plot trimmed lines and overlay airport locations
lines!(loc, connection=:network,
pen=(lw=1.5, arrow=(len=0.5,fill=:red,shape=0.5), offset="250k"))
plot!(loc, symbol="E-500", fill=:orange, ml=0.25)
# Make an arc of radius 12 cm from 45 to 135 degrees around map
# center and use it to place text
path = [cosd.(45:135) sind.(45:135)] .* 12
# Move up 8 cm so origin is at the map center
lines!(path, region=(-9.0,9.0,0,15), proj=:linear, figscale=1.0,
decorated=(quoted=true, n_labels=1, font=32, curved=true,
const_label="IMPORTANT PACIFIC AIRPORTS"),
pen=(:faint,:white), noclip=true, yshift=8, show=true
See also GMT ex48