|
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("contourpen", "contour_pen", "v0.18.0", remove_version="v0.20.0") |
| 19 | +@deprecate_parameter("facadepen", "facade_pen", "v0.18.0", remove_version="v0.20.0") |
| 20 | +@deprecate_parameter("meshpen", "mesh_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 | + contour_pen: str | None = None, |
| 34 | + facade_pen: str | None = None, |
| 35 | + mesh_pen: str | None = None, |
33 | 36 | projection: str | None = None, |
34 | 37 | zscale: float | str | None = None, |
35 | 38 | zsize: float | str | None = None, |
@@ -60,6 +63,9 @@ def grdview( # noqa: PLR0913 |
60 | 63 | - JZ = zsize |
61 | 64 | - R = region |
62 | 65 | - V = verbose |
| 66 | + - Wc = contour_pen |
| 67 | + - Wf = facade_pen |
| 68 | + - Wm = mesh_pen |
63 | 69 | - c = panel |
64 | 70 | - p = perspective |
65 | 71 | - t = transparency |
@@ -101,15 +107,15 @@ def grdview( # noqa: PLR0913 |
101 | 107 |
|
102 | 108 | For any of these choices, you may force a monochrome image by appending the |
103 | 109 | modifier **+m**. |
104 | | - contourpen : str |
| 110 | + contour_pen |
105 | 111 | Draw contour lines on top of surface or mesh (not image). Append pen attributes |
106 | 112 | used for the contours. |
107 | | - meshpen : str |
108 | | - Set the pen attributes used for the mesh. You must also select ``surftype`` of |
109 | | - **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. |
| 116 | + mesh_pen |
| 117 | + Set the pen attributes used for the mesh. You must also select ``surftype`` of |
| 118 | + **m** or **sm** for meshlines to be drawn. |
113 | 119 | shading : str |
114 | 120 | Provide the name of a grid file with intensities in the (-1,+1) range, or a |
115 | 121 | constant intensity to apply everywhere (affects the ambient light). |
@@ -162,6 +168,9 @@ def grdview( # noqa: PLR0913 |
162 | 168 | aliasdict = AliasSystem( |
163 | 169 | Jz=Alias(zscale, name="zscale"), |
164 | 170 | JZ=Alias(zsize, name="zsize"), |
| 171 | + Wc=Alias(contour_pen, name="contour_pen"), |
| 172 | + Wf=Alias(facade_pen, name="facade_pen"), |
| 173 | + Wm=Alias(mesh_pen, name="mesh_pen"), |
165 | 174 | ).add_common( |
166 | 175 | B=frame, |
167 | 176 | J=projection, |
|
0 commit comments