From 48f12cc241a34c2879fb89645b609a357c7f9314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yvonne=20Fr=C3=B6hlich?= <94163266+yvonnefroehlich@users.noreply.github.com> Date: Mon, 29 Apr 2024 11:48:09 +0200 Subject: [PATCH] Figure.contour & Figur.grdcontour: Improve docstring of pen (#3210) --- pygmt/src/contour.py | 11 ++++++++++- pygmt/src/grdcontour.py | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pygmt/src/contour.py b/pygmt/src/contour.py index 7c6dc8a3904..c5aa26a3b10 100644 --- a/pygmt/src/contour.py +++ b/pygmt/src/contour.py @@ -102,7 +102,16 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs): skip : bool or str [**p**\|\ **t**]. Skip input points outside region. - {pen} + pen : str or list + [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]]. + *type*, if present, can be **a** for annotated contours or **c** for regular + contours [Default]. The pen sets the attributes for the particular line. + Default pen for annotated contours is ``"0.75p,black"`` and for regular + contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed + color determined by the pen setting. If **+cl** is appended the colors of the + contour lines are taken from the CPT (see ``levels``). If **+cf** is + appended the colors from the CPT file are applied to the contour annotations. + Select **+c** for both effects. label : str Add a legend entry for the contour being plotted. Normally, the annotated contour is selected for the legend. You can select the diff --git a/pygmt/src/grdcontour.py b/pygmt/src/grdcontour.py index 2d3ba763722..0c461330acf 100644 --- a/pygmt/src/grdcontour.py +++ b/pygmt/src/grdcontour.py @@ -88,7 +88,16 @@ def grdcontour(self, grid, **kwargs): five controlling algorithms. See :gmt-docs:`grdcontour.html#g` for details. {verbose} - {pen} + pen : str or list + [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]]. + *type*, if present, can be **a** for annotated contours or **c** for regular + contours [Default]. The pen sets the attributes for the particular line. + Default pen for annotated contours is ``"0.75p,black"`` and for regular + contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed + color determined by the pen setting. If **+cl** is appended the colors of the + contour lines are taken from the CPT (see ``levels``). If **+cf** is + appended the colors from the CPT file are applied to the contour annotations. + Select **+c** for both effects. {panel} {coltypes} label : str