|
9 | 9 | from pygmt._typing import PathLike |
10 | 10 | from pygmt.alias import Alias, AliasSystem |
11 | 11 | from pygmt.clib import Session |
12 | | -from pygmt.helpers import build_arg_list, fmt_docstring, use_alias |
| 12 | +from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring, use_alias |
13 | 13 |
|
14 | 14 | __doctest_skip__ = ["grdview"] |
15 | 15 |
|
16 | 16 |
|
17 | 17 | @fmt_docstring |
| 18 | +@deprecate_parameter("facadepen", "facade_pen", "v0.18.0", remove_version="v0.20.0") |
| 19 | +@deprecate_parameter("meshpen", "mesh_pen", "v0.18.0", remove_version="v0.20.0") |
| 20 | +@deprecate_parameter("contourpen", "contour_pen", "v0.18.0", remove_version="v0.20.0") |
18 | 21 | @use_alias( |
19 | 22 | C="cmap", |
20 | 23 | G="drapegrid", |
21 | 24 | N="plane", |
22 | 25 | Q="surftype", |
23 | | - Wc="contourpen", |
24 | | - Wm="meshpen", |
25 | | - Wf="facadepen", |
26 | 26 | I="shading", |
27 | 27 | f="coltypes", |
28 | 28 | n="interpolation", |
29 | 29 | ) |
30 | 30 | def grdview( # noqa: PLR0913 |
31 | 31 | self, |
32 | 32 | grid: PathLike | xr.DataArray, |
| 33 | + mesh_pen: str | None = None, |
| 34 | + contour_pen: str | None = None, |
| 35 | + facade_pen: str | None = None, |
33 | 36 | projection: str | None = None, |
34 | 37 | zscale: float | str | None = None, |
35 | 38 | zsize: float | str | None = None, |
@@ -101,13 +104,13 @@ def grdview( # noqa: PLR0913 |
101 | 104 |
|
102 | 105 | For any of these choices, you may force a monochrome image by appending the |
103 | 106 | modifier **+m**. |
104 | | - contourpen : str |
| 107 | + contour_pen |
105 | 108 | Draw contour lines on top of surface or mesh (not image). Append pen attributes |
106 | 109 | used for the contours. |
107 | | - meshpen : str |
| 110 | + mesh_pen |
108 | 111 | Set the pen attributes used for the mesh. You must also select ``surftype`` of |
109 | 112 | **m** or **sm** for meshlines to be drawn. |
110 | | - facadepen :str |
| 113 | + facade_pen |
111 | 114 | Set the pen attributes used for the facade. You must also select ``plane`` for |
112 | 115 | the facade outline to be drawn. |
113 | 116 | shading : str |
@@ -162,6 +165,9 @@ def grdview( # noqa: PLR0913 |
162 | 165 | aliasdict = AliasSystem( |
163 | 166 | Jz=Alias(zscale, name="zscale"), |
164 | 167 | JZ=Alias(zsize, name="zsize"), |
| 168 | + Wc=Alias(contour_pen, name="contour_pen"), |
| 169 | + Wf=Alias(facade_pen, name="facade_pen"), |
| 170 | + Wm=Alias(mesh_pen, name="mesh_pen"), |
165 | 171 | ).add_common( |
166 | 172 | B=frame, |
167 | 173 | J=projection, |
|
0 commit comments