My code is behaving weird after switching to a new Apple chips based computer

Below is the messed up map:

Screenshot 2023-06-22 at 2.59.49 PM

Here is my code:

VAR_grid = mat2grid(Array(transpose(VAR)), x=Lon, y=Lat);
grdimage!(VAR_grid, color=cpt1, nan_alpha=true, shade=false);

Plot the land map, clipping water leaving land:

Land_clip = grdclip(“@earth_relief_05m”, low=[0 NaN]);
cpt0 = grd2cpt(Land_clip, color=“250/240/230,250/240/230”);

grdimage!(Land_clip, color=cpt0, nan_alpha=true, shade=false,
xaxis=(annot=60, grid=30, FONT_ANNOT_PRIMARY=“12p,Helvetica,black”,),
yaxis=(annot=30, grid=15, FONT_ANNOT_PRIMARY=“12p,Helvetica,black”,),
par=(MAP_GRID_PEN_PRIMARY=“0.005p”,), coast=true);

Plot the colorbar:

colorbar!(color=cpt2, frame=(xlabel=“$(VarN)”,),
par=(FONT_ANNOT_PRIMARY=“10p,Times-Roman,black”, FONT_LABEL=“14p,Times-Roman,black”),
pos=(anchor=:BC, length=(12.5,0.4), offset=(-0.2,0.6)));

Save the map:

Path5 = “$(P1)/figures/$(i)historical"; ~isdir(Path5) && mkdir(Path5);
NN = NN+1;
File_w = "$(Path5)/$(i)
$(NN).jpg”; isfile(File_w) && rm(File_w);

many thanks.

(GMT.jl cases should be posted under that tag)

You mean that your use case used to work in other computers?

We can’t reproduce this, so …

The above works for me.

1 Like

Many thanks for the reply.

Yes, my code works on my Intel based Macbook. Not sure if it is due to the chips or due to a newer version of GMT.jl.

How do I find the GMT.jl cases?

We need a reproducible example to see what’s happening. And plotting the coast twice doesn’t help either.

1 Like