Legend for faults

Dear all,

I am trying to show the legend, which includes the annotation for major faults … somehow the legend does not match to what I plot. Any ideas? Attached is the image.

I plot the fault this way …

fig.plot(x=faulteastnortnew[:,0], y=faulteastnortnew[:,1], style=“f1c/0.3c+l+t”, color=“black”,pen=‘0.1p,black’,label=‘Major fault’)

Thanks in advance,

Hello @mrzjrbn,
Thanks for your post!
I can confirm this issue (please see a complete code example below). However, in the upstream GMT documentation at plot — GMT 6.6.0 documentation I finde that the auto-legend is not available for fronts.

Code example

import pygmt

fig = pygmt.Figure()

    region=[0, 10, 0, 10],
    x=[1, 8],
    y=[6, 7],
    style="f1c/0.3c+l+t",  # inverse triangles on left side 
    color="black",   # up on release v0.8.0 renamed to "fill"
    label="Major fault",  # label used for legend

Output figure

1 Like

Just some background information: legend can display all the symbols offered in plot. However, when -l is used then there is code in the API that collects all the various -l arguments and the symbols in effect at the time and prepares for a final hidden call to legend. That code is not yet completed and cannot handle the more elaborate symbols like fronts, decorated and quoted lines (which are all very similar). You are welcome to open a feature request on the GMT GitHub site to keep a record that this should eventually be done. We will do it as our schedule and other activities allow - the C developers are aware of the omission.

1 Like

Hi Yvonne,

Thanks for the clarification … will take a look at the documentation :slight_smile:

Hi Pwessel,

Thank you for the info … :slight_smile: