Skip to content

Commit 48f12cc

Browse files
Figure.contour & Figur.grdcontour: Improve docstring of pen (#3210)
1 parent b1f5cc7 commit 48f12cc

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

pygmt/src/contour.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,16 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs):
102102
skip : bool or str
103103
[**p**\|\ **t**].
104104
Skip input points outside region.
105-
{pen}
105+
pen : str or list
106+
[*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]].
107+
*type*, if present, can be **a** for annotated contours or **c** for regular
108+
contours [Default]. The pen sets the attributes for the particular line.
109+
Default pen for annotated contours is ``"0.75p,black"`` and for regular
110+
contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed
111+
color determined by the pen setting. If **+cl** is appended the colors of the
112+
contour lines are taken from the CPT (see ``levels``). If **+cf** is
113+
appended the colors from the CPT file are applied to the contour annotations.
114+
Select **+c** for both effects.
106115
label : str
107116
Add a legend entry for the contour being plotted. Normally, the
108117
annotated contour is selected for the legend. You can select the

pygmt/src/grdcontour.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,16 @@ def grdcontour(self, grid, **kwargs):
8888
five controlling algorithms. See :gmt-docs:`grdcontour.html#g` for
8989
details.
9090
{verbose}
91-
{pen}
91+
pen : str or list
92+
[*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]].
93+
*type*, if present, can be **a** for annotated contours or **c** for regular
94+
contours [Default]. The pen sets the attributes for the particular line.
95+
Default pen for annotated contours is ``"0.75p,black"`` and for regular
96+
contours ``"0.25p,black"``. Normally, all contours are drawn with a fixed
97+
color determined by the pen setting. If **+cl** is appended the colors of the
98+
contour lines are taken from the CPT (see ``levels``). If **+cf** is
99+
appended the colors from the CPT file are applied to the contour annotations.
100+
Select **+c** for both effects.
92101
{panel}
93102
{coltypes}
94103
label : str

0 commit comments

Comments
 (0)