-
Notifications
You must be signed in to change notification settings - Fork 245
Add the Spilhaus projection to the supported GMT projections #4657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
f83c07e
e40ddd7
e0f7f1d
3284005
b16cda2
0e603a6
a03e479
d17dc2c
75479f2
6ff4b98
cf02820
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| r""" | ||
| Spilhaus projection | ||
| =================== | ||
|
|
||
| The Spilhaus projection is a world map projection that presents the world's | ||
| oceans as one contiguous body of water, with Antarctica at the top. It was | ||
| developed by Athelstan Spilhaus and is useful for oceanographic studies. | ||
|
|
||
| **+proj=spilhaus+width=**\ *width* | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Propably more a GMT related question: But still wondering why the synthax for this projection is different comparted to the other projections (see also the text at https://pygmt-dev--4657.org.readthedocs.build/en/4657/projections/index.html#projections). Why we do not use something like Sp/width ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because GMT is running out of single-letter codes for map projections.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, we also have
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There must be some historical reasons. BTW, the +proj=spilhaus+width=width syntax comes fro PROJ4, which is supported by GMT but not well documented. |
||
|
|
||
| The projection is set as a PROJ string with ``+proj=spilhaus`` and the figure | ||
| size is set with *width*. | ||
| """ | ||
|
|
||
| # %% | ||
| import pygmt | ||
|
|
||
| fig = pygmt.Figure() | ||
| # Use the PROJ string to set the Spilhaus projection | ||
| fig.basemap(projection="+proj=spilhaus+width=15c", region="d", frame="none") | ||
| # Plot Earth relief with shading for better visual effect | ||
| fig.grdimage(grid="@earth_relief_01d", shading=True) | ||
| fig.coast(shorelines=True) | ||
| fig.basemap(frame="a30f30g") | ||
| fig.show() | ||
|
Chuan1937 marked this conversation as resolved.
|
||
|
|
||
| # sphinx_gallery_tags = ["misc"] | ||
|
Chuan1937 marked this conversation as resolved.
Outdated
|
||
Uh oh!
There was an error while loading. Please reload this page.