Skip to content
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

Adding cylindrical projections to gallery #727

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 18 additions & 0 deletions examples/projections/cyl/cyl_equal_area.py
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()
18 changes: 18 additions & 0 deletions examples/projections/cyl/cyl_equidistant.py
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()
2 changes: 1 addition & 1 deletion examples/projections/cyl/cyl_mercator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
import pygmt

fig = pygmt.Figure()
fig.coast(region=[0, 360, -80, 80], frame="afg", land="gray", projection="M0/0/8i")
fig.coast(region=[0, 360, -80, 80], frame="afg", land="red", projection="M0/0/12c")
fig.show()
18 changes: 18 additions & 0 deletions examples/projections/cyl/cyl_miller.py
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()
19 changes: 19 additions & 0 deletions examples/projections/cyl/cyl_transverse_mercator.py
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 examples/projections/cyl/cyl_universal_transverse_mercator.py
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()