File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ Plotting map elements
37
37
Figure.text
38
38
Figure.timestamp
39
39
Figure.vlines
40
+ Figure.clip
40
41
41
42
Plotting tabular data
42
43
~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -102,8 +102,6 @@ def __init__(self) -> None:
102
102
self ._preview_dir = TemporaryDirectory (prefix = f"{ self ._name } -preview-" )
103
103
self ._activate_figure ()
104
104
105
- self .clip = clip ()
106
-
107
105
def __del__ (self ) -> None :
108
106
"""
109
107
Clean up the temporary directory that stores the previews.
@@ -139,6 +137,17 @@ def region(self) -> np.ndarray:
139
137
wesn = lib .extract_region ()
140
138
return wesn
141
139
140
+ @property
141
+ def clip (self ) -> clip :
142
+ """
143
+ Set up a clipping path.
144
+
145
+ - :meth:`pygmt.Figure.clip.land`
146
+ - :meth:`pygmt.Figure.clip.water`
147
+ - :meth:`pygmt.Figure.clip.polygon`
148
+ """
149
+ return clip ()
150
+
142
151
def savefig (
143
152
self ,
144
153
fname : str | PurePath ,
@@ -415,7 +424,6 @@ def _repr_html_(self) -> str:
415
424
416
425
from pygmt .src import ( # type: ignore[misc]
417
426
basemap ,
418
- clip ,
419
427
coast ,
420
428
colorbar ,
421
429
contour ,
You can’t perform that action at this time.
0 commit comments