Hi! I am trying to inset exactly the second map in the first one. The problem is that the inset have a white background and not the desired colors. Someone could help me?
Part of my code:
gmt inset begin -DjBR+w3c/3.6c+o0.1c #Inset definition
gmt basemap -R65/90/5/50 -JM$print_size -Bf1a2 #Base map
gmt plot sutures.gmt -W0.8p,black #Plot some geological features
gmt grdimage $infile -R65/90/5/50 -JM$print_size -I+a100+ne0.8 # Grid image
gmt pscoast -R65/90/5/25 -Df -W0.02c,black
gmt inset end
Thanks in advance!
How did you specify the CPT for the main map? Perhaps if it is scaled for just that area and you inset covers a much larger area and maybe for the one the CPT is not optimal?
I mean, whatever CPT you used or set in the main plot will be inherited as the current CPT in the inset.
@pwessel I havent been able to see the error yet. I paste the complete code
gmt makecpt -Cusgs.cpt -T0/3000 # Line (1): CPT for the main map
gmt grdimage $infile -R67.5/72.5/34/40 -JM$print_size -I+a100+ne0.8
gmt basemap -R67.5/72.5/34/40 -JM$print_size -Bf1a2 -BWESN
gmt colorbar -Bx1000+l"Topography [m]" -Dx0c/-1.5c+w3c/0.25c/BL+h+ml -I
gmt makecpt -Cvioletred1,green,dodgerblue1 -T-5,100,200,350 #Line (5): CPT for the earthquakes points
gmt colorbar -Bx100+l"Earthquake depth [km]" -Dx3.8c/-1.5c+w3c/0.25c/BL+h+ml -I #-F+r2p+gwhite@30+p0.5p
gmt plot -C -Sc0.125c -Wfaint -Gblue -i0,1,2 $fil
gmt inset begin -DjBR+w3c/3.6c+o0.1c
gmt basemap -R65/90/5/50 -JM$print_size -Bf1a2 -BWESN
gmt plot sutures.gmt -W0.8p,black
gmt grdimage $infile -R65/90/5/50 -JM$print_size -I+a100+ne0.8
gmt pscoast -R65/90/5/25 -Df -W0.02c,black
gmt inset end
gmt end shows
Thanks again!
Try adding -Cgeo
in the following of your script.
gmt grdimage $infile -R65/90/5/50 -JM$print_size -I+a100+ne0.8 -Cgeo
This way, you will use the geo master cpt for your map.
Otherwise, grdimage will use the cpt created by gmt makecpt -Cvioletred1,green,dodgerblue1 -T-5,100,200,350
Yes, or just repeat your one one to recreate the topo CPT you used in the main plot.