Skip to content

Commit 40fb536

Browse files
authored
Merge branch 'main' into pygmtlogo
2 parents c4792ca + c55cf5e commit 40fb536

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

doc/techref/projections.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ myst:
1212

1313
# GMT Map Projections
1414

15-
The table below shows the projection codes for the 31 GMT map projections:
15+
The table below shows the projection codes for the 32 GMT map projections:
1616

1717
| PyGMT Projection Argument | Projection Name |
1818
| --- | --- |
@@ -47,3 +47,4 @@ The table below shows the projection codes for the 31 GMT map projections:
4747
| **W**[{{ lon0 }}/]*width* | [](/projections/misc/misc_mollweide.rst) |
4848
| **X***width*[**l**\|**p***exp*\|**T**\|**t**][/*height*[**l**\|**p***exp*\|**T**\|**t**]][**d**] | Cartesian [linear](/projections/nongeo/cartesian_linear.rst), [logarithmic](/projections/nongeo/cartesian_logarithmic.rst), [power](/projections/nongeo/cartesian_power.rst), and time |
4949
| **Y**{{ lon0 }}/{{ lat0 }}/*width* | [](/projections/cyl/cyl_equal_area.rst) |
50+
| **+proj=spilhaus+width=**_width_ | [](/projections/misc/misc_spilhaus.rst) |
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
r"""
2+
Spilhaus projection
3+
===================
4+
5+
The Spilhaus projection is a world map projection that presents the world's
6+
oceans as one contiguous body of water, with Antarctica at the top. It was
7+
developed by Athelstan Spilhaus and is useful for oceanographic studies.
8+
9+
**+proj=spilhaus+width=**\ *width*
10+
11+
The projection is set as a PROJ string with ``+proj=spilhaus`` and the figure
12+
size is set with *width*.
13+
14+
.. note::
15+
16+
This projection works well for coastlines but currently has issues for filling
17+
land and water masses.
18+
"""
19+
20+
# %%
21+
import pygmt
22+
from pygmt.params import Axis
23+
24+
fig = pygmt.Figure()
25+
# Use the PROJ string to set the Spilhaus projection
26+
fig.coast(
27+
region="d",
28+
projection="+proj=spilhaus+width=12c",
29+
frame=Axis(annot=True, tick=True, grid=True),
30+
shorelines=True,
31+
)
32+
fig.show()

0 commit comments

Comments
 (0)