Geological Fault Map Plot

Dear all,
I am using GMT 5.4.1 in order to plot some geological faults that I have on csv format. reading the manual it says that I need to add -Sf to plot fronts, well here I have part of my code.

awk '{if (NR >=1) print $2,$1}' Ftunari.txt | psxy -JM -R -Sf0.3/0.2p+l+t -W1.3,red -O -K >> $archi

However I just see a line and not the triangles over the dashed line (attach the figure in jpg file), would you mind to correct me.
Thank in advance

Not tried to run your code but the gap as well as the size look awfully small to me. 0.3 is missing a unit and 0.2p for size is tiny. Maybe it just gets eaten by the 1.3 (points I presume) wide line? You’ll need a symbol size which is larger than 1/2 line width to be seen at all. So everything larger than 0.7p might be noticeable.

Dear @KristofKoch,
I tried what you told me and not yet plotting. I changed the area to have a small one. this is part of the code.

flags="-Xc -Yc -B3 -K -P -V"
pts="-Wthinnest -V"
psbasemap $region $proy $flags > $archi
pscoast $region $proy -B3 -B+t"Faults" -N1 -Df -W2/1 -Scornflowerblue -O -V -K >> $archi
awk '{if (NR >=1) print $2,$1}' Ftunari.txt | psxy -JM -R -Sf5i/5.5p+l+t -W0.25,red -O -K >> $archi 
psxy  -R  -J   /dev/null -O  >> $archi
gv $archi &

The Ftunari.txt is:

lat lon
-17.21608008810 -66.45652555550
-17.24225415910 -66.40536714390
-17.26485903870 -66.36134711530
-17.28508445720 -66.32089627820
-17.30055095380 -66.28996328510
-17.31363798930 -66.24475352600
-17.32220404890 -66.20972786000
-17.32791475530 -66.18617119610
-17.33648081500 -66.16404220870
-17.34290535970 -66.14119938310
-17.34932990440 -66.11264585100
-17.35932364060 -66.08766151040
-17.36432050870 -66.06267716990
-17.37645575990 -66.02698525480
-17.38073878970 -66.00414242910
-17.38787717270 -65.98058576520
-17.39644323230 -65.95345990970
-17.40500929190 -65.92347870100
-17.40786464510 -65.89706668390
-17.41143383660 -65.87850688800

Thank you in advance.

Think your problem is with the awk statement. You need “NR >1”, not “NR>=1”.
You have included the “lat lon” line which seems to upset the drawing of the symbols but not the drawing of the line.

Dear @RustyCuth,
Thank you for the support and time, you were right, AWK was the problem, here I post the part of AWK code:

awk '{if (NR > 1) print $2,$1}' Ftunari.txt | psxy -JM -R -Sf0.25i/6.5p+l+f -W0.55,red -O -K

Thank you a lot.

No need to awk it. This can be simplified to

psxy Ftunari.txt -JM -R -Sf0.25i/6.5p+l+f -W0.55,red -h -: -O -K

Dear @Joaquim,
You are right, I am used to use AWK,however for this case it works with no AWK too.
Thank you for your time.

Dear All,
Thank you for all the answers, one more question, did you try to plot data points over a map insert, for example:

flags="-Xc -Yc -B2.5 -K -P -V"
flagsea="-X6.7c -Y15.85c -Bf -K -P -V"
pts="-Wthinnest -V"

psbasemap $region $proy $flags > $archi
grdgradient $grdfile -A180 -Ne0.7
grdimage $grdfile $region $proy $flags -C$color -O -K -n+c>> $archi
pscoast $region $proy -B2.5 -B+t"Faults" -N1 -Df -W2/1 -Scornflowerblue -O -V -K >> $archi
awk '{if (NR > 1) print $2,$1}' Ftunari.txt | psxy -JM -R -Sf0.25i/8.5p+l+f -W1.3,red -O -K >> $archi

#another map inside the "big map" 
#it is a small set of faults that are so near
grdimage $grdfile $regionea $proyea $flagsea -C$color -O -K -n+c>> $archi
pscoast $regionea $proyea -Bf -N1 -Df -W2/1  -X6.7c -Y15.85c -O -V -K >> $archi

#this is the attemp, but no draw
awk '{if (NR > 1) print $2,$1}' Fllojeta.txt | psxy -JM -R -Sf0.9/3.5p+l+f -W1.3,red -O -K -P >> $archi

psxy  -R  -J   /dev/null -O  >> $archi
gv $archi &

I am not able to plot a fault within the small map, do you have an idea, thank you a lot and stay safe.

I think the -J and -R options in the first mapping command (i.e. your grdimage) are enough. You should remove the following -J and -R options.

1 Like

If you used GMT 6 modern mode then you could use gmt inset to deal with the inset placement and scaling.

1 Like