Mixing UTM and geographic axes annotations

This is a question that comes up regularly such that GMT has a gallery example (famous example 28) to show how to do it. But even with that example it's not a trivial thing to do.

However it's trivial from the Julia wrapper under the condition that the grid or image to be displayed is referenced internally. If it is not, grdedit can be used to assign a referencing system via its option proj. The other condition is that grid or image to be displayed is already in memory (so that the internal magicks can work). Given that, example 28) boils down to this (with a little bit less fancy details).

using GMT
G = gmtread("@Kilauea.utm.nc");

Create a cpt and display the map

C = makecpt(cmap="copper", range=(0,1500));
imshow(G, cmap=C, shade=true, frame=(axes="WS", annot=true),
	coast=(shore=true, ocean=:lightblue, frame=(axes="EN", annot=true, grid=true)))

Download a Pluto Notebook here