From ea84f0bf66bcfbd2911a4c235bb7882eea68af42 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 30 May 2023 14:24:37 +0200 Subject: [PATCH 1/3] Expand docstrings for 'scale' parameter --- pygmt/src/meca.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index f48ef0ba188..eb6aef0ecb0 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -161,9 +161,23 @@ def meca( ``convention`` is not needed and is ignored if specified. scale : str - Adjust the scaling of the radius of the beachball, which is - proportional to the magnitude. *scale* defines the size for - magnitude = 5 (i.e. scalar seismic moment M0 = 4.0E23 dynes-cm). + *scale*\ [**+a**\ *angle*][**+f**\ *font*][**+j**\ *justify*]\ + [**+l**][**+m**][**+o**\ *dx*[/*dy*]][**+s**\ *reference*] + Adjust scaling of the radius of the beachball, which is + proportional to the magnitude. By default, *scale* defines the + size for magnitude = 5 (i.e., scalar seismic moment + M0 = 4.0E23 dynes-cm). If **+l** is used the radius will be + proportional to the seismic moment instead. Use **+s** and give + a *reference* to change the reference magnitude (or moment), and + use **+m** to plot all beachballs with the same size. A text + string can be specified to appear near the beachball + (corresponding to column or parameter ``event_name``). + Append **+a**\ *angle* to change the angle of the text string; + append **+f**\ *font* to change its font (size,fontname,color); + append **+j**\ *justify* to change the text location relative + to the beachball [Default is ``"TC"``, i.e., Top Center]; + append **+o** to offset the text string by *dx*\ /*dy*. + convention : str Focal mechanism convention. Choose from: From 1c454d2fb143bcc7535fb8f57c1e2eb50e172bde Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Tue, 30 May 2023 14:56:27 +0200 Subject: [PATCH 2/3] Remove blank lines, Fix syntax --- pygmt/src/meca.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index eb6aef0ecb0..b25ff69c077 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -159,10 +159,9 @@ def meca( ``convention`` parameter is required so we know how to interpret the columns. If ``spec`` is a dictionary or a pd.DataFrame, ``convention`` is not needed and is ignored if specified. - scale : str *scale*\ [**+a**\ *angle*][**+f**\ *font*][**+j**\ *justify*]\ - [**+l**][**+m**][**+o**\ *dx*[/*dy*]][**+s**\ *reference*] + [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*] Adjust scaling of the radius of the beachball, which is proportional to the magnitude. By default, *scale* defines the size for magnitude = 5 (i.e., scalar seismic moment @@ -177,7 +176,6 @@ def meca( append **+j**\ *justify* to change the text location relative to the beachball [Default is ``"TC"``, i.e., Top Center]; append **+o** to offset the text string by *dx*\ /*dy*. - convention : str Focal mechanism convention. Choose from: From 4130fd34368354a694ff35e0c8cdfb4c5c075799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Sat, 3 Jun 2023 18:08:51 +0200 Subject: [PATCH 3/3] Add dote at the end of general syntax for 'scale' --- pygmt/src/meca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index da16b377c52..e661139c763 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -161,7 +161,7 @@ def meca( ``convention`` is not needed and is ignored if specified. scale : str *scale*\ [**+a**\ *angle*][**+f**\ *font*][**+j**\ *justify*]\ - [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*] + [**+l**][**+m**][**+o**\ *dx*\ [/\ *dy*]][**+s**\ *reference*]. Adjust scaling of the radius of the beachball, which is proportional to the magnitude. By default, *scale* defines the size for magnitude = 5 (i.e., scalar seismic moment