Skip to content
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
326b779
Add aliases outline and nodalplanes for L and T to list
yvonnefroehlich May 28, 2023
0bfeea9
Add first part of docstrings for 'outline' and 'nodalplanes'
yvonnefroehlich May 28, 2023
e3ff25b
Update and improve docstring of 'pen' and 'outline'
yvonnefroehlich May 28, 2023
a7d9d03
Fix typo
yvonnefroehlich May 28, 2023
add0b6d
Use singular, Use commar
yvonnefroehlich May 28, 2023
89567d7
Shorten docstring for 'outline'
yvonnefroehlich May 28, 2023
930639e
Expand docstring for 'pen'
yvonnefroehlich May 28, 2023
4d34ea1
Complete default for 'offset'
yvonnefroehlich May 28, 2023
d13950f
Add alias 'box' for 'Fr'
yvonnefroehlich May 29, 2023
05e62bb
Fix highlighting syntax
yvonnefroehlich May 30, 2023
ef64db2
Make formulations consistent
yvonnefroehlich May 30, 2023
ea42d28
Use same aliase as in Julia for 'T'
yvonnefroehlich May 30, 2023
bebcb8e
Merge branch 'main' into add-meca-aliases-L-T
yvonnefroehlich May 30, 2023
c20d12e
Adjust formulations and Use 'nodal'
yvonnefroehlich May 30, 2023
6cc1b91
Add end at the end of general syntax for 'nodal'
yvonnefroehlich Jun 2, 2023
1587bb6
Add end at the end of general syntax for 'nodal'
yvonnefroehlich Jun 2, 2023
f94a2ed
Merge branch 'main' into add-meca-aliases-L-T
yvonnefroehlich Jun 2, 2023
ed329b6
Shorten docstring for 'box'
yvonnefroehlich Jun 2, 2023
5c95d84
[format-command] fixes
actions-bot Jun 2, 2023
3400538
Merge branch 'main' into add-meca-aliases-L-T
yvonnefroehlich Jun 3, 2023
c0c81cd
Add dote at the end of general syntax for 'Fr'
yvonnefroehlich Jun 5, 2023
4f865ec
Use alias 'labelbox' instead of 'box' for 'Fr'
yvonnefroehlich Jun 5, 2023
4008ad3
Use alias 'labelbox' instead of 'box' for 'Fr'
yvonnefroehlich Jun 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 35 additions & 7 deletions pygmt/src/meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ def data_format_code(convention, component="full"):
B="frame",
C="cmap",
E="extensionfill",
Fr="labelbox",
G="compressionfill",
J="projection",
L="outline",
N="no_clip",
R="region",
T="nodal",
V="verbose",
W="pen",
c="panel",
Expand Down Expand Up @@ -204,19 +207,23 @@ def meca(
event_name : str or list of str, or 1-D numpy array
Text string(s), e.g., event name(s) to appear near the beachball(s).
List must be the same length as the number of events. Will override
the ``event_name`` values in ``spec`` if ``spec`` is a dictionary
the ``event_name`` labels in ``spec`` if ``spec`` is a dictionary
or pd.DataFrame.
labelbox : bool or str
[*fill*].
Draw a box behind the label if given. Use *fill* to give a fill color
[Default is ``"white"``].
offset : bool or str
[**+p**\ *pen*][**+s**\ *size*].
Offset beachball(s) to longitude(s) and latitude(s) specified in the
the last two columns of the input file or array, or by
``plot_longitude`` and ``plot_latitude`` if provided. A small circle
is plotted at the initial location and a line connects the beachball
to the circle. Use **+s**\ *size* to set the diameter of the circle
[Default is no circle]. Use **+p**\ *pen* to set the line pen
attributes [Default is ``"0.25p"``]. The fill of the circle is set
via ``compressionfill`` or ``cmap``, i.e., corresponds to the fill
of the compressive quadrants.
[Default is no circle]. Use **+p**\ *pen* to set the pen attributes
for this feature [Default is set via ``pen``]. The fill of the
circle is set via ``compressionfill`` or ``cmap``, i.e.,
corresponds to the fill of the compressive quadrants.
compressionfill : str
Set color or pattern for filling compressive quadrants
[Default is ``"black"``]. This setting also applies to the fill of
Expand All @@ -225,8 +232,29 @@ def meca(
Set color or pattern for filling extensive quadrants
[Default is ``"white"``].
pen : str
Set pen attributes for outline of beachball
[Default is ``"0.25p,black,solid"``].
Set pen attributes for all lines related to beachball [Default is
``"0.25p,black,solid"``]. This setting applies to ``outline``,
``nodal``, and ``offset``, unless overruled by arguments passed to
those parameters. Draws circumference of beachball.
outline : bool or str
[*pen*].
Draw circumference and nodal planes of beachball. Use *pen* to set
the pen attributes for this feature [Default is set via ``pen``].
nodal : bool, int, or str
[*nplane*][/*pen*].
Plot the nodal planes and outline the bubble which is transparent.
If *nplane* is

- ``0`` or ``True``: both nodal planes are plotted [Default].
- ``1``: only the first nodal plane is plotted.
- ``2``: only the second nodal plane is plotted.

Use /*pen* to set the pen attributes for this feature [Default is
set via ``pen``].
For double couple mechanisms, ``nodal`` renders the beachball
transparent by drawing only the nodal planes and the circumference.
For non-double couple mechanisms, ``nodal=0`` overlays best
double couple transparently.
cmap : str
File name of a CPT file or a series of comma-separated colors (e.g.,
*color1,color2,color3*) to build a linear continuous CPT from those
Expand Down