Inset map plotting issue

Hi there
The code below doesnot enclosed the rectangle as it should. Am i doing wrong?
Would you please suggest me?

gmt inset begin -DjBL+w1c -M0 -F+gwhite+p1p
gmt coast -R68/100/04/36 -JM? -EIN,NP+glightbrown+p0.2p -A10000
echo 84.40 29.069 87.69 26.55 | gmt plot -Sr+s -Wthick,red
gmt end show

Looks like the main plot is missing. The inset place a small inset INSIDE an existing map but you have nothing, at least not in the script you posted. Also has no gmt begin.

Dear sir thank you for the reply.
I have a complete script.the problem is that it gives the inset map but area bounded by rectangle is not similar to the Lon/lat given in script.
What is the mistake? I can’t figure out so posted to the forum
Sincerely ram

I am unable to guess what region and projection you set up prior to gmt inset, and it is unclear if you cut out gmt inset end as well. But looks like you are asking for a 1x1 cm inset and wish to cram a regional Mercator map inside it?

It sounds like you have a similar issue to the one talked about here. Perhaps the solution suggested there will be helpful?

here is my complete script

gmt makecpt -Crainbow -T0/250/20 -Z >seis.cpt
gmt begin daya_shanker_sir png
REM gmt coast -R81/90.42/26/29.5 -JM10c -Ba1 -BWesN -EES+gbisque -Gwhite -Wfaint -N1/1p -Sazure1 -Df --FORMAT_GEO_MAP=dddF -C0
gmt coast -R84/87/26.5/29 -JM10c -Ba1 -BWesN -EES+gbisque -Gwhite -Wfaint -N1/1p -Sazure1 -Df --FORMAT_GEO_MAP=dddF -C0
gmt plot fault_MCT.txt -Wthin,black -Sf0.5c/0.1c+l+t -Gblack
REM 2.2c is gap between triangle and 0.1c is size,l for left side and t for triangle,r for rightside
gmt plot fault_MBT.txt -Wthin,black -Sf0.5c/0.1c+l+t -Gblack
gmt plot fault_MFT.txt -Wthin,black -Sf0.5c/0.1c+l+t -Gblack
gmt text dayasir_country.txt -F+f12p,Helvetica-Bold,black
gmt plot fault_STD.txt -Wthin,black -Sf0.5c/0.1c+r+t -Gblackgmt text std.txt -F+f8p,Helvetica-Bold,black
gmt plot final_after_shocks_adhikari_baillard_yamada_zerodepthremoved_3columnlessthan6.txt -W.1 -Sc.08 -Cseis.cpt -h15
REM gmt plot dayasir_lessthanequal5.9.txt -W.1 -Sc.08 -Cseis.cpt -h15 
gmt colorbar -I -DJMR+w6c+o1c/-0.100c+ml  -Bxaf+l"Depth" -By+l"Km" -Cseis.cpt --FONT_LABEL=8p --FONT_ANNOT_PRIMARY=8P
REM gmt plot dayasir_greaterthanequal6.txt -W.1 -Sa.5c -Gyellow
gmt plot final_after_shocks_adhikari_baillard_yamada_zerodepthremoved_3columnmaggreatequal6.txt -W.1 -Sa.4c -Gyellow
gmt plot dayasir_historicquake.txt -W.1 -Sa.5c -Gred
gmt text dayasir_historic_mag.txt -F+f10p,Helvetica-Bold,gold
gmt plot greatquake.txt -W.1 -Sa.5c -Gred
REM gmt plot judi.txt -W1p,red,-
gmt plot judi.txt -W2p,red,--
gmt plot thaple.txt -W2p,red,-
REM gmt plot thaple1.txt -W2p,red,
gmt plot kathmandu.txt -W2p,red,-
gmt plot mg.txt -W2p,red,-
gmt plot me.txt -W2p,red,-
REM gmt text indianame.txt -F+f14p,Helvetica-Bold,red
REM gmt text country.txt -F+f14p,Helvetica,black
gmt text faultname.txt -F+f12p,Helvetica-Bold,indianred1
gmt text dayasir_majorfault.txt -F+f8p,Helvetica-Bold,black
gmt inset begin -DjBL+w1c -M0 -F+gwhite+p1p
gmt coast -R68/100/04/36 -JM? -EIN,NP+glightbrown+p0.2p -A10000
REM echo 84.40 29.069 87.69 26.55 | gmt plot -Sr+s -Wthick,red
echo 84.40 26.55 87.69 29.069 | gmt plot -Sr+s -Wthick,red
REM echo 84 29 87 26 | gmt plot -Sr+s -Wthick,red
gmt end show

Thanks, you are missing a gmt inset end. I stripped your scrip to just the coast and inset and got this:

gmt begin daya_shanker_sir png
  gmt coast -R84/87/26.5/29 -JM10c -Ba1 -BWesN -EES+gbisque -Gwhite -Wfaint -N1/1p -Sazure1 -Df --FORMAT_GEO_MAP=dddF -C0
  gmt inset begin -DjBL+w1c -M0 -F+gwhite+p1p
    gmt coast -R68/100/04/36 -JM? -EIN,NP+glightbrown+p0.2p -A10000
    echo 84.40 26.55 87.69 29.069 | gmt plot -Sr+s -Wthick,red
  gmt inset end
gmt end show

which seems reasonable:

Dear sir
thank you very much
would you please look at the inset map, the red rectangle is not enclosing the area i need to cover.
it enclose the territory of india but my study area is central nepal. my problem lies at this point.the inset map not enclosing the area given in script
it works for me without the line gmt inset end (you have added in the script)

Inset map issue


inset map appears black
here is my code
REM gmt makecpt -Cjet -T0/250/20 -Z >seis.cpt
REM gmt set ANNOT_FONT_PRIMARY Times-Bold ANNOT_FONT_SIZE_PRIMARY 8
gmt begin chapter4 png
REM gmt grdimage @earth_relief_15s.grd -R80.00/88.2/26.45/30.5 -JM10c -I+d -Ba0.25 -BWesN --FORMAT_GEO_MAP=dddF -C0
gmt grdimage @earth_relief_15s.grd -R80.00/88.2/26.45/30.5 -JM10c -I+d -Ba2 -BWesN --FORMAT_FLOAT_OUT=dddF -C0
gmt coast -R80.00/88.2/26.45/30.5 -W.5 -N1/1.5p,black -Slightblue
gmt plot fault_MCT.txt -W1p,black -Sf0.8c/0.1c+l+t -Gblack
REM 2.2c is gap between triangle and 0.1c is size,l for left side and t for triangle,r for rightside
gmt plot fault_MBT.txt -W1p,black -Sf0.8c/0.1c+l+t -Gblack
gmt plot fault_MFT.txt -W1p,black -Sf0.8c/0.1c+l+t -Gblack
gmt plot fault_std_hariram.txt -W1p,black -Sf0.8c/0.1c+r+b -Gblack
REM gmt plot adhikari_21_3_3.5_swarm3col.txt -W.12 -Sc.20c -Gorange -lM3.0-3.5
REM gmt plot adhikari_21_gt3.5_le4.0_swarm3col.txt -W.12 -Sc.15c -Gblue -lM">3.5<=4
REM gmt plot adhikari_21_all_swarm3col.txt -W.12 -Sc.10c -Gpurple -l"Aftershocks "
REM gmt plot swarm_work_gorkha.txt -W.12 -Sa.7c -Gyellow -l"Gorkha earthquake"
REM gmt plot geo_india_historic.txt -W.1 -Sa.7c -Gblue -l"Historic Earthquake"
REM gmt legend -DjBC+l1.5+w3.7c/2.3c+o0.1c/0.1c -F+p0.6p+gwhite+s
REM o0.1c/0.1c for gap between legend and frame, 2cm is height,l1.5 is for line gap
REM gmt text swarm_work_historic.txt -F+f14p,Helvetica-Bold,red, -Gwhite
REM gmt text manaslu_himalchuli.txt -F+f14p,Helvetica-Bold,black -Gwhite
REM gmt text swarm_name.txt -F+f14p,Helvetica-Bold,red -Gwhite
REM gmt text swarm_work_himalaya.txt -F+f14p+a-5,Helvetica-Bold,green
REM gmt plot greatquake.txt -W.1 -Sa.9c -Gred
REM gmt text swarm_work_country.txt -F+f14p,Helvetica-Bold,black, -Gwhite
REM gmt text faultname.txt -F+f12p,Helvetica-Bold,black
gmt text swarm_work_majorfault.txt -F+f14p,Helvetica-Bold,black, -Gwhite
REM echo 84.9 28.599 84.557 28.35 | gmt plot -Sr+s -W1p,red
REM 84.9, 84.557, 28.599, 28.35)
gmt plot gorkha_rupture_area.txt -W2p,orange
gmt inset begin -DjTR+w1.5c -M0
REM gmt inset begin -DjTR+w3c/3c+o0.05c -M0.2c/0.9c/0.1c/0.4c
gmt grdimage @earth_relief_01m.grd -R68/100/4/35 -C -Ba5 -BwEsN
echo 80.00 26.45 88.2 30.5 | gmt plot -Sr+s -Wthick,red
REM gmt inset begin -DjTR+w1.5c -M0 -F+gwhite+p1p
REM gmt coast -R68/100/4/33 -JM? -ENP,IN+glightbrown+p0.2p -A10000
REM echo 84.40 29.069 87.69 26.55 | gmt plot -Sr+s -Wthick,red
REM echo 84.40 29.069 87.69 26.55 | gmt plot -Sr+s -Wthick,red
REM echo 84.50 27.5 85.50 28.75 | gmt plot -Sr+s -Wthick,red
gmt inset end
gmt end show

Lots of problems, some possibly intentional:

FORMAT_FLOAT_OUT is used to set a geographic format. Those are not floats, those are degrees etc. You probably meant FORMAT_MAP_GEO ?
-C0 sets black. I guess that is what you wanted?
Even after removing that the session CPT is screwed due to the above format statement.