Skip to content

Commit a4f7b53

Browse files
Figure.meca: Add aliases for "L", "T", and "Fr" (#2546)
Co-authored-by: Dongdong Tian <[email protected]>
1 parent 9b18a1f commit a4f7b53

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

pygmt/src/meca.py

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,13 @@ def data_format_code(convention, component="full"):
7979
B="frame",
8080
C="cmap",
8181
E="extensionfill",
82+
Fr="labelbox",
8283
G="compressionfill",
8384
J="projection",
85+
L="outline",
8486
N="no_clip",
8587
R="region",
88+
T="nodal",
8689
V="verbose",
8790
W="pen",
8891
c="panel",
@@ -204,19 +207,23 @@ def meca(
204207
event_name : str or list of str, or 1-D numpy array
205208
Text string(s), e.g., event name(s) to appear near the beachball(s).
206209
List must be the same length as the number of events. Will override
207-
the ``event_name`` values in ``spec`` if ``spec`` is a dictionary
210+
the ``event_name`` labels in ``spec`` if ``spec`` is a dictionary
208211
or pd.DataFrame.
212+
labelbox : bool or str
213+
[*fill*].
214+
Draw a box behind the label if given. Use *fill* to give a fill color
215+
[Default is ``"white"``].
209216
offset : bool or str
210217
[**+p**\ *pen*][**+s**\ *size*].
211218
Offset beachball(s) to longitude(s) and latitude(s) specified in the
212219
the last two columns of the input file or array, or by
213220
``plot_longitude`` and ``plot_latitude`` if provided. A small circle
214221
is plotted at the initial location and a line connects the beachball
215222
to the circle. Use **+s**\ *size* to set the diameter of the circle
216-
[Default is no circle]. Use **+p**\ *pen* to set the line pen
217-
attributes [Default is ``"0.25p"``]. The fill of the circle is set
218-
via ``compressionfill`` or ``cmap``, i.e., corresponds to the fill
219-
of the compressive quadrants.
223+
[Default is no circle]. Use **+p**\ *pen* to set the pen attributes
224+
for this feature [Default is set via ``pen``]. The fill of the
225+
circle is set via ``compressionfill`` or ``cmap``, i.e.,
226+
corresponds to the fill of the compressive quadrants.
220227
compressionfill : str
221228
Set color or pattern for filling compressive quadrants
222229
[Default is ``"black"``]. This setting also applies to the fill of
@@ -225,8 +232,29 @@ def meca(
225232
Set color or pattern for filling extensive quadrants
226233
[Default is ``"white"``].
227234
pen : str
228-
Set pen attributes for outline of beachball
229-
[Default is ``"0.25p,black,solid"``].
235+
Set pen attributes for all lines related to beachball [Default is
236+
``"0.25p,black,solid"``]. This setting applies to ``outline``,
237+
``nodal``, and ``offset``, unless overruled by arguments passed to
238+
those parameters. Draws circumference of beachball.
239+
outline : bool or str
240+
[*pen*].
241+
Draw circumference and nodal planes of beachball. Use *pen* to set
242+
the pen attributes for this feature [Default is set via ``pen``].
243+
nodal : bool, int, or str
244+
[*nplane*][/*pen*].
245+
Plot the nodal planes and outline the bubble which is transparent.
246+
If *nplane* is
247+
248+
- ``0`` or ``True``: both nodal planes are plotted [Default].
249+
- ``1``: only the first nodal plane is plotted.
250+
- ``2``: only the second nodal plane is plotted.
251+
252+
Use /*pen* to set the pen attributes for this feature [Default is
253+
set via ``pen``].
254+
For double couple mechanisms, ``nodal`` renders the beachball
255+
transparent by drawing only the nodal planes and the circumference.
256+
For non-double couple mechanisms, ``nodal=0`` overlays best
257+
double couple transparently.
230258
cmap : str
231259
File name of a CPT file or a series of comma-separated colors (e.g.,
232260
*color1,color2,color3*) to build a linear continuous CPT from those

0 commit comments

Comments
 (0)