Skip to content

Commit 33c20e7

Browse files
committed
fix
1 parent d98448b commit 33c20e7

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

doc/_templates/autosummary/class.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
.. rubric:: Methods Summary
1818

1919
.. autosummary::
20+
:toctree:
2021
{% for item in methods %}
2122
{% if item != '__init__' %}
2223
{{ objname }}.{{ item }}

doc/api/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Miscellaneous
221221

222222
which
223223
show_versions
224+
pygmt.src.clip.ClipAccessor
224225

225226
Datasets
226227
--------

pygmt/figure.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from tempfile import TemporaryDirectory
99
from typing import Literal, overload
1010

11-
from pygmt.src import clip
11+
from pygmt.src.clip import ClipAccessor
1212
from pygmt._typing import PathLike
1313

1414
try:
@@ -139,15 +139,13 @@ def region(self) -> np.ndarray:
139139
return wesn
140140

141141
@property
142-
def clip(self) -> clip:
142+
def clip(self) -> ClipAccessor:
143143
"""
144144
Set up a clipping path.
145145
146-
- :meth:`pygmt.Figure.clip.land`
147-
- :meth:`pygmt.Figure.clip.water`
148-
- :meth:`pygmt.Figure.clip.polygon`
146+
:class:`pygmt.src.clip.ClipAccessor`
149147
"""
150-
return clip()
148+
return ClipAccessor()
151149

152150
def savefig(
153151
self,

pygmt/src/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from pygmt.src.basemap import basemap
66
from pygmt.src.binstats import binstats
77
from pygmt.src.blockm import blockmean, blockmedian, blockmode
8-
from pygmt.src.clip import clip
98
from pygmt.src.coast import coast
109
from pygmt.src.colorbar import colorbar
1110
from pygmt.src.config import config

pygmt/src/clip.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def _clip_method(clip_type):
1919
return "coast"
2020

2121

22-
class clip: # noqa: N801
22+
class ClipAccessor:
2323
"""
2424
Clip.
2525
"""
@@ -33,6 +33,11 @@ def __init__(self):
3333
def polygon(self, x, y):
3434
"""
3535
Clip the data to a polygon.
36+
37+
Parameters
38+
----------
39+
x/y
40+
Coordinates of polygon.
3641
"""
3742
self.type = "polygon"
3843
self.data = (x, y)

0 commit comments

Comments
 (0)