Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
931bfc1
Figure.clip: Initial implementation
seisman Mar 26, 2025
bb32777
Define more classes
seisman Apr 26, 2025
14a49b9
Merge branch 'main' into feature/clip
seisman May 1, 2025
430bb39
Merge branch 'main' into feature/clip
seisman May 3, 2025
5fc8871
Merge branch 'main' into feature/clip
seisman May 12, 2025
83f04fa
Improve docstrings
seisman May 12, 2025
ccf4d92
Update clip.land and clip.water
seisman May 12, 2025
1784795
Update clip.solar
seisman May 13, 2025
05bd0c0
Merge branch 'main' into feature/clip
seisman May 17, 2025
cc46add
Replace self._preprocess with self._activate_figure
seisman May 17, 2025
105c317
Add more aliases to clip
seisman May 19, 2025
a95d351
Add fmt_docstring
seisman May 19, 2025
3573bd7
Fix a doctest
seisman May 19, 2025
a9527ae
Fix docstring
seisman May 19, 2025
ca8dd43
Merge branch 'main' into feature/clip
seisman May 20, 2025
faaabb7
clip.polygon should accept a path or pandas object
seisman May 21, 2025
6cf4956
Move clip.dcw before clip.polygon
seisman May 22, 2025
88d198a
Merge branch 'main' into feature/clip
seisman May 24, 2025
f34a297
Merge branch 'main' into feature/clip
seisman May 25, 2025
a4955b9
Updates
seisman May 25, 2025
d8d33d0
Merge branch 'main' into feature/clip
seisman Sep 20, 2025
19bc113
Merge branch 'main' into feature/clip
seisman Sep 21, 2025
6d96b27
Merge branch 'main' into feature/clip
seisman Sep 24, 2025
f601459
Update to the new syntax
seisman Sep 24, 2025
5bcfaef
Merge branch 'main' into feature/clip
seisman Oct 10, 2025
06b08b1
Merge branch 'main' into feature/clip
seisman Jun 25, 2026
376284a
Remove unrelated changes
seisman Jun 25, 2026
a4363b8
Updates
seisman Jun 26, 2026
c869514
Fix the API doc page
seisman Jun 29, 2026
4bf4ca3
Update Figure.clip
seisman Jun 29, 2026
e6a5e47
Merge branch 'main' into feature/clip
seisman Jun 29, 2026
ad0444b
Expose clipping as Figure methods
seisman Jun 29, 2026
cb1ee70
Remove test_clip.py
seisman Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
.. rubric:: Attributes

{% for item in attributes %}
.. autoattribute::
{{ objname }}.{{ item }}
.. autoattribute:: {{ objname }}.{{ item }}
:no-index:
{% endfor %}
{% endif %}

Expand Down
13 changes: 13 additions & 0 deletions doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ Plotting raster data
Figure.image
Figure.tilemap

Clipping
~~~~~~~~

.. autosummary::
:toctree: generated

Figure.clip_land
Figure.clip_water
Figure.clip_dcw
Figure.clip_solar
Figure.clip_polygon
Figure.clip_mask

Configuring layout
~~~~~~~~~~~~~~~~~~

Expand Down
12 changes: 12 additions & 0 deletions pygmt/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
from pygmt._typing import PathLike
from pygmt.src.basemap import basemap as _basemap
from pygmt.src.choropleth import choropleth as _choropleth
from pygmt.src.clip import clip_dcw as _clip_dcw
from pygmt.src.clip import clip_land as _clip_land
from pygmt.src.clip import clip_mask as _clip_mask
from pygmt.src.clip import clip_polygon as _clip_polygon
from pygmt.src.clip import clip_solar as _clip_solar
from pygmt.src.clip import clip_water as _clip_water
from pygmt.src.coast import coast as _coast
from pygmt.src.colorbar import colorbar as _colorbar
from pygmt.src.contour import contour as _contour
Expand Down Expand Up @@ -446,6 +452,12 @@ def _repr_html_(self) -> str:
# Attach plotting functions implemented in pygmt/src as Figure methods.
basemap = _basemap
choropleth = _choropleth
clip_dcw = _clip_dcw
clip_land = _clip_land
clip_mask = _clip_mask
clip_polygon = _clip_polygon
clip_solar = _clip_solar
clip_water = _clip_water
coast = _coast
colorbar = _colorbar
contour = _contour
Expand Down
Loading
Loading