From b5966aa549e60559e6efc583d3141acffb46abcc Mon Sep 17 00:00:00 2001 From: Meghan Jones Date: Wed, 4 Aug 2021 11:53:10 -0400 Subject: [PATCH] Move description for -l common option to pygmt/helpers/decorators.py (#1408) * Move label description to COMMON OPTIONS * Add link to full -l docs Co-authored-by: Dongdong Tian Co-authored-by: Michael Grund <23025878+michaelgrund@users.noreply.github.com> --- pygmt/helpers/decorators.py | 4 ++++ pygmt/src/histogram.py | 3 +-- pygmt/src/plot.py | 4 +--- pygmt/src/plot3d.py | 3 +-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 04df0ca4cfb..e8879eaa9b0 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -163,6 +163,10 @@ (:gmt-term:`PROJ_MEAN_RADIUS`), and the specification of latitude type (:gmt-term:`PROJ_AUX_LATITUDE`). Geodesic distance calculations is also controlled by method (:gmt-term:`PROJ_GEODESIC`).""", + "l": r""" + label : str + Add a legend entry for the symbol or line being plotted. Full + documentation is at :gmt-docs:`gmt.html#l-full`.""", "n": r""" interpolation : str [**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *BC*][**+c**][**+t**\ *threshold*]. diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 80b6cb88efb..ece72986b21 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -119,8 +119,7 @@ def histogram(self, table, **kwargs): {XY} {U} {V} - label : str - Add a legend entry for the symbol or line being plotted. + {l} {p} {t} """ diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index df87972074a..520df6773df 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -194,9 +194,7 @@ def plot(self, x=None, y=None, data=None, size=None, direction=None, **kwargs): {c} {f} {i} - label : str - Add a legend entry for the symbol or line being plotted. - + {l} {p} {t} *transparency* can also be a 1d array to set varying transparency diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index 7a591c9c11f..d1e4a327647 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -164,8 +164,7 @@ def plot3d( {c} {f} {i} - label : str - Add a legend entry for the symbol or line being plotted. + {l} {p} {t} *transparency* can also be a 1d array to set varying transparency