Skip to content

Commit 5f8a084

Browse files
authored
Convert line breaks from DOS to UNIX (#734)
1 parent c1407f5 commit 5f8a084

File tree

6 files changed

+145
-145
lines changed

6 files changed

+145
-145
lines changed

examples/projections/azim/azim_equidistant.py

100755100644
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"""
2-
Azimuthal Equidistant
3-
=====================
4-
5-
The main advantage of this projection is that distances from the projection
6-
center are displayed in correct proportions. Also directions measured from the
7-
projection center are correct. It is very useful for a global view on locations
8-
that lie within a certain distance or for comparing distances of different
9-
locations relative to the projection center.
10-
11-
``elon0/lat0[/horizon]/scale`` or ``Elon0/lat0[/horizon]/width``
12-
13-
``lon0/lat0`` specifies the projection center. The optional parameter
14-
``horizon`` specifies the max distance to the projection center (i.e. the
15-
visibile portion of the rest of the world map) in degrees <= 180° (default 180°).
16-
"""
17-
import pygmt
18-
19-
fig = pygmt.Figure()
20-
fig.coast(projection="E-100/40/4.5i", region="g", frame="g", land="gray")
21-
fig.show()
1+
"""
2+
Azimuthal Equidistant
3+
=====================
4+
5+
The main advantage of this projection is that distances from the projection
6+
center are displayed in correct proportions. Also directions measured from the
7+
projection center are correct. It is very useful for a global view on locations
8+
that lie within a certain distance or for comparing distances of different
9+
locations relative to the projection center.
10+
11+
``elon0/lat0[/horizon]/scale`` or ``Elon0/lat0[/horizon]/width``
12+
13+
``lon0/lat0`` specifies the projection center. The optional parameter
14+
``horizon`` specifies the max distance to the projection center (i.e. the
15+
visibile portion of the rest of the world map) in degrees <= 180° (default 180°).
16+
"""
17+
import pygmt
18+
19+
fig = pygmt.Figure()
20+
fig.coast(projection="E-100/40/4.5i", region="g", frame="g", land="gray")
21+
fig.show()

examples/projections/azim/azim_general_perspective.py

100755100644
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
"""
2-
General Perspective
3-
===================
4-
5-
The general perspective projection imitates the view of the Earth from a finite
6-
point in space. In a full view of the earth one third of its surface area can
7-
be seen.
8-
9-
``lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale`` or ``width``
10-
11-
``lon0/lat0`` specifies the projection center, ``altitude`` the height
12-
in km of the viewpoint above local sea level (If altitude is less than 10,
13-
then it is the distance from the center of the earth to the viewpoint in earth
14-
radii). With ``azimuth`` the direction (in degrees) in which you are looking is
15-
specified, measured clockwise from north. ``tilt`` is given in degrees and is the
16-
viewing angle relative to zenith. A tilt of 0° is looking straight down, 60° is
17-
looking 30° above horizon. ``twist`` is the clockwise rotation of the image (in
18-
degrees). ``Width`` and ``Height`` describe the viewport angle in degrees.
19-
20-
The example shows the coast of northern europe viewed from 250 km above sea
21-
level looking 30° from north at a tilt of 45°. The height and width of the
22-
viewing angle is both 60°, which imitates viewing with naked eye.
23-
"""
24-
import pygmt
25-
26-
fig = pygmt.Figure()
27-
fig.coast(
28-
projection="G4/52/250/30/45/0/60/60/5i",
29-
region="g",
30-
frame=["x10g10", "y5g5"],
31-
land="gray",
32-
)
33-
fig.show()
1+
"""
2+
General Perspective
3+
===================
4+
5+
The general perspective projection imitates the view of the Earth from a finite
6+
point in space. In a full view of the earth one third of its surface area can
7+
be seen.
8+
9+
``lon0/lat0/altitude/azimuth/tilt/twist/Width/Height/scale`` or ``width``
10+
11+
``lon0/lat0`` specifies the projection center, ``altitude`` the height
12+
in km of the viewpoint above local sea level (If altitude is less than 10,
13+
then it is the distance from the center of the earth to the viewpoint in earth
14+
radii). With ``azimuth`` the direction (in degrees) in which you are looking is
15+
specified, measured clockwise from north. ``tilt`` is given in degrees and is the
16+
viewing angle relative to zenith. A tilt of 0° is looking straight down, 60° is
17+
looking 30° above horizon. ``twist`` is the clockwise rotation of the image (in
18+
degrees). ``Width`` and ``Height`` describe the viewport angle in degrees.
19+
20+
The example shows the coast of northern europe viewed from 250 km above sea
21+
level looking 30° from north at a tilt of 45°. The height and width of the
22+
viewing angle is both 60°, which imitates viewing with naked eye.
23+
"""
24+
import pygmt
25+
26+
fig = pygmt.Figure()
27+
fig.coast(
28+
projection="G4/52/250/30/45/0/60/60/5i",
29+
region="g",
30+
frame=["x10g10", "y5g5"],
31+
land="gray",
32+
)
33+
fig.show()

examples/projections/azim/azim_general_stereographic.py

100755100644
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
"""
2-
General Stereographic
3-
=====================
4-
5-
This map projection is a conformal, azimuthal projection. It is mainly used with
6-
a projection center in one of the poles. Then meridians appear as straight lines
7-
and cross latitudes at a right angle. Unlike the azimuthal equidistant projection,
8-
the distances in this projection are not displayed in correct proportions.
9-
It is often used as a hemisphere map like the Lambert Azimuthal Equal Area
10-
projection.
11-
12-
``slon0/lat0[/horizon]/scale`` or ``Slon0/lat0[/horizon]/width``
13-
14-
``lon0/lat0`` specifies the projection center, the optional ``horizon`` parameter
15-
specifies the max distance from projection center (in degrees, < 180, default 90).
16-
17-
This projection can be displayed:
18-
19-
* With map boundaries coinciding with longitude and latitude:
20-
``region`` specified via ``xmin/xmax/ymin/ymax``
21-
* As a map with rectangular boundaries: ``region`` specified as lower left and
22-
upper right corner ``xlleft/ylleft/xuright/yurightr``. Note the appended ``r``.
23-
"""
24-
import pygmt
25-
26-
fig = pygmt.Figure()
27-
fig.coast(region="4/14/52/57", projection="S0/90/4.5i", frame="ag", land="gray")
28-
fig.show()
1+
"""
2+
General Stereographic
3+
=====================
4+
5+
This map projection is a conformal, azimuthal projection. It is mainly used with
6+
a projection center in one of the poles. Then meridians appear as straight lines
7+
and cross latitudes at a right angle. Unlike the azimuthal equidistant projection,
8+
the distances in this projection are not displayed in correct proportions.
9+
It is often used as a hemisphere map like the Lambert Azimuthal Equal Area
10+
projection.
11+
12+
``slon0/lat0[/horizon]/scale`` or ``Slon0/lat0[/horizon]/width``
13+
14+
``lon0/lat0`` specifies the projection center, the optional ``horizon`` parameter
15+
specifies the max distance from projection center (in degrees, < 180, default 90).
16+
17+
This projection can be displayed:
18+
19+
* With map boundaries coinciding with longitude and latitude:
20+
``region`` specified via ``xmin/xmax/ymin/ymax``
21+
* As a map with rectangular boundaries: ``region`` specified as lower left and
22+
upper right corner ``xlleft/ylleft/xuright/yurightr``. Note the appended ``r``.
23+
"""
24+
import pygmt
25+
26+
fig = pygmt.Figure()
27+
fig.coast(region="4/14/52/57", projection="S0/90/4.5i", frame="ag", land="gray")
28+
fig.show()

examples/projections/azim/azim_gnomonic.py

100755100644
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
"""
2-
Gnomonic
3-
========
4-
5-
The point of perspective of the gnomonic projection lies at the center of the
6-
earth. As a consequence great circles (orthodromes) on the surface of the earth
7-
are displayed as straight lines, which makes it suitable for distance estimation
8-
for navigational purposes. It is neither conformal nor equal-area and the
9-
distortion increases greatly with distance to the projection center. It follows
10-
that the scope of application is restricted to a small area around the
11-
projection center (at a maximum of 60°).
12-
13-
``flon0/lat0[/horizon]/scale`` or ``Flon0/lat0[/horizon]/width``
14-
15-
``lon0/lat0`` specify the projection center, the optional parameter ``horizon``
16-
specifies the max distance from projection center (in degrees, < 90, default 60).
17-
"""
18-
import pygmt
19-
20-
fig = pygmt.Figure()
21-
fig.coast(projection="F-90/15/4.5i", region="g", frame="20g20", land="gray")
22-
fig.show()
1+
"""
2+
Gnomonic
3+
========
4+
5+
The point of perspective of the gnomonic projection lies at the center of the
6+
earth. As a consequence great circles (orthodromes) on the surface of the earth
7+
are displayed as straight lines, which makes it suitable for distance estimation
8+
for navigational purposes. It is neither conformal nor equal-area and the
9+
distortion increases greatly with distance to the projection center. It follows
10+
that the scope of application is restricted to a small area around the
11+
projection center (at a maximum of 60°).
12+
13+
``flon0/lat0[/horizon]/scale`` or ``Flon0/lat0[/horizon]/width``
14+
15+
``lon0/lat0`` specify the projection center, the optional parameter ``horizon``
16+
specifies the max distance from projection center (in degrees, < 90, default 60).
17+
"""
18+
import pygmt
19+
20+
fig = pygmt.Figure()
21+
fig.coast(projection="F-90/15/4.5i", region="g", frame="20g20", land="gray")
22+
fig.show()

examples/projections/azim/azim_orthographic.py

100755100644
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
"""
2-
Orthographic
3-
============
4-
5-
This is a perspective projection like the general perspective,
6-
but with the difference that the point of perspective lies in infinite distance.
7-
It is therefore often used to give the appearance of a globe viewed from outer
8-
space, were one hemisphere can be seen as a whole. It is neither conformal nor
9-
equal-area and the distortion increases near the edges.
10-
11-
``glon0/lat0[/horizon]/scale`` or ``Glon0/lat0[/horizon]/width``
12-
13-
``lon0/lat0`` specifies the projection center, the optional parameter ``horizon``
14-
specifies the max distance from projection center (in degrees, <= 90, default 90)
15-
"""
16-
import pygmt
17-
18-
fig = pygmt.Figure()
19-
fig.coast(projection="G10/52/4.5i", region="g", frame="g", land="gray")
20-
fig.show()
1+
"""
2+
Orthographic
3+
============
4+
5+
This is a perspective projection like the general perspective,
6+
but with the difference that the point of perspective lies in infinite distance.
7+
It is therefore often used to give the appearance of a globe viewed from outer
8+
space, were one hemisphere can be seen as a whole. It is neither conformal nor
9+
equal-area and the distortion increases near the edges.
10+
11+
``glon0/lat0[/horizon]/scale`` or ``Glon0/lat0[/horizon]/width``
12+
13+
``lon0/lat0`` specifies the projection center, the optional parameter ``horizon``
14+
specifies the max distance from projection center (in degrees, <= 90, default 90)
15+
"""
16+
import pygmt
17+
18+
fig = pygmt.Figure()
19+
fig.coast(projection="G10/52/4.5i", region="g", frame="g", land="gray")
20+
fig.show()

examples/projections/nongeo/cartesian.py

100755100644
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
"""
2-
Cartesian
3-
=========
4-
5-
``Xwidth/[height]``: Give the ``width`` of the figure and the optional argument ``height``.
6-
"""
7-
import pygmt
8-
9-
fig = pygmt.Figure()
10-
fig.plot(
11-
# The ``x`` and ``y`` parameters are used to plot lines on the figure.
12-
x=[3, 9, 2],
13-
y=[4, 9, 37],
14-
pen="3p,red",
15-
# ``region`` sets the x and y ranges or the Cartesian figure.
16-
region=[0, 10, 0, 50],
17-
# The argument ``WSne`` is passed to ``frame`` to put axis labels only on the left and bottom axes.
18-
projection="X15c/10c",
19-
frame=["af", "WSne"],
20-
)
21-
fig.show()
1+
"""
2+
Cartesian
3+
=========
4+
5+
``Xwidth/[height]``: Give the ``width`` of the figure and the optional argument ``height``.
6+
"""
7+
import pygmt
8+
9+
fig = pygmt.Figure()
10+
fig.plot(
11+
# The ``x`` and ``y`` parameters are used to plot lines on the figure.
12+
x=[3, 9, 2],
13+
y=[4, 9, 37],
14+
pen="3p,red",
15+
# ``region`` sets the x and y ranges or the Cartesian figure.
16+
region=[0, 10, 0, 50],
17+
# The argument ``WSne`` is passed to ``frame`` to put axis labels only on the left and bottom axes.
18+
projection="X15c/10c",
19+
frame=["af", "WSne"],
20+
)
21+
fig.show()

0 commit comments

Comments
 (0)