-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding cylindrical projections to gallery (#727)
* Add cyl_transverse_mercator.py * Add cyl_universal_transverse_mercator.py * Changing land color to red in cyl_mercator.py to match GMT docs example; changing units from US to SI * Add cyl_equidistant.py * Add cyl_equal_area.py * Add cyl_miller.py
- Loading branch information
1 parent
862bd77
commit e6d45ec
Showing
6 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Cylindrical equal-area | ||
====================== | ||
``Ylon0/lat0/width``: Give central meridian ``lon0``, the standard parallel ``lat0``, and the figure ``width``. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# Use region "d" to specify global region (-180/180/-90/90) | ||
fig.coast( | ||
region="d", | ||
projection="Y35/30/12c", | ||
water="dodgerblue", | ||
shorelines="thinnest", | ||
frame="afg", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Cylindrical equidistant | ||
======================= | ||
``Qwidth``: Give the figure ``width``. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# Use region "d" to specify global region (-180/180/-90/90) | ||
fig.coast( | ||
region="d", | ||
projection="Q12c", | ||
land="tan4", | ||
water="lightcyan", | ||
frame="afg", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Miller cylindrical | ||
================== | ||
``J[lon0/]width``: Give the optional central meridian ``lon0`` and the figure ``width``. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
fig.coast( | ||
region=[-180, 180, -80, 80], | ||
projection="J-65/12c", | ||
land="khaki", | ||
water="azure", | ||
shorelines="thinnest", | ||
frame="afg", | ||
) | ||
fig.show() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Transverse Mercator | ||
=================== | ||
``T[lon0/][lat0/]width``: Give central meridian ``lon0``, the latitude of the | ||
origin ``lat0`` (optional), and the figure width. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
fig.coast( | ||
region=[20, 50, 30, 45], | ||
projection="T35/12c", | ||
land="lightbrown", | ||
water="seashell", | ||
shorelines="thinnest", | ||
frame="afg", | ||
) | ||
fig.show() |
19 changes: 19 additions & 0 deletions
19
examples/projections/cyl/cyl_universal_transverse_mercator.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Universal Transverse Mercator | ||
============================= | ||
``U[UTM Zone/][lat0/]width``: Give UTM Zone ``UTM Zone``, and the figure width. | ||
""" | ||
import pygmt | ||
|
||
fig = pygmt.Figure() | ||
# UTM Zone is set to 52R | ||
fig.coast( | ||
region=[127.5, 128.5, 26, 27], | ||
projection="U52R/12c", | ||
land="lightgreen", | ||
water="lightblue", | ||
shorelines="thinnest", | ||
frame="afg", | ||
) | ||
fig.show() |