Symbol of strike-slip faults - Legend

Hi there!

I’m interested in learning how to adjust the distance between the front line and the symbol for strike-slip faults (arrays). I understand that there are parameters to modify the distance between the symbols (gap), but I’m unsure how to specifically change how close or far they are from the front line. Can you provide guidance on this?

Below, I’m attaching an image of what I want to modify.

I’m asking because I’m trying to create the legend and the movement arrows are too far apart from the front line.

file11 = 'SHP_Edit/Falla_rumbo_sinestral.shp'
fig.plot(data=shp_gmt(file11), pen="0.5p,black", style="f1.5c/0.2c+l+S45+o0.5c")

with open("legend_faultsMap.txt", "w") as text_leg:
    text_leg.write("N 1\n")
    text_leg.write("S 0.35c - 0.4c - 0.5p,black 0.8c Falla\n")
    text_leg.write("S 0.35c - 0.4c - 0.5p,black,- 0.8c Falla cubierta\n")
    text_leg.write("S 0.35c f+r+t 0.45c/-3/0.06c black 0.5p,black 0.8c Falla inversa\n")
    text_leg.write("S 0.35c f+r 0.45c/-5/0.08c black 0.5p,black 0.8c Falla normal\n")
    text_leg.write("S 0.35c f+l+s45 0.45c/-1/0.16c black 0.5p,black 0.8c Falla de rumbo sinestral\n")

fig.legend(spec="legend_faultsMap.txt", position='jLB+o0.2c', box='+gwhite+p0.5p')

Legend

Thanks!!

Hello @IKTE,

Welcome to the GMT forum :slightly_smiling_face:!

I feel it is not possible to change the distance between the arrows and the baseline of a normal fault, especially not for the legend entry.

Maybe it can help to add some vertical space between the legend entries using the legend code G: test_legend_front.txt (380 Bytes)

N1
S 0.35c - 0.4c - 0.5p,black 0.8c Falla
G 0.07c
S 0.35c - 0.4c - 0.5p,black,- 0.8c Falla cubierta
G 0.07c
S 0.35c f+r+t 0.45c/-3/0.06c black 0.5p,black 0.8c Falla inversa
G 0.07c
S 0.35c f+r 0.45c/-5/0.08c black 0.5p,black 0.8c Falla normal
G 0.07c
S 0.35c f+l+s45 0.45c/-1/0.16c black 0.5p,black 0.8c Falla de rumbo sinestral
import pygmt

size = 5

fig = pygmt.Figure()
fig.basemap(region=[-size, size, -size, size], projection=f"X{size*2}c", frame=1)

fig.legend(spec="test_legend_front.txt")

fig.show()
# fig.savefig(fname="legend_front_normalfault.png")

1 Like

Thank you very much, Ivonne, this works for me. :grinning:

Hello.
I can not show reverse faulting on the map on GMT Windows.
Can you help with this?
Thanks.

Hi @dyg1995,

You can plot reverse faulting in GMT with the next line:

gmt psxy Falla_inversa_o_cabalgamiento.gmt -J -R -W0.8,black -O -K -Sf0.3c/0.06c+r+t -Ggray36 >> map.ps

You should have an input file containing coordinates, typically in the *.gmt format. The parameters for region and projection should be defined beforehand. In the following part, Sf0.3c/0.06c+r+t, you can adjust the size of triangles and the offset between symbols. Additionally, you can specify the positioning of triangles on the right (r) or left (l) side, and with the parameter G, you can adjust the fill color (in this instance, it’s gray36).

I am currently utilizing GMT version 6.4.0.