Skip to content

Commit

Permalink
Expand documentation for Cartesian projections (#2643)
Browse files Browse the repository at this point in the history
Expand the documentations of the Cartesian linear, logarithmic,
and power projections regarding the scale option.

* Add general syntax for 'scale' option in 'cartesian_linear.py'
* Add general syntax for 'scale' option in 'cartesian_logarithmic.py'
* Add general syntax for 'scale' option in 'cartesian_power.py'
* Mention geo and calender coordinates usage with linear projection
  • Loading branch information
yvonnefroehlich authored Aug 28, 2023
1 parent 82be115 commit dcf1c7f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 9 deletions.
17 changes: 15 additions & 2 deletions examples/projections/nongeo/cartesian_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@
Cartesian linear
================
**X**\ *width*/[*height*]: Give the *width* of the figure and the optional
*height*.
**X**\ *width*\ [/*height*] or **x**\ *x-scale*\ [/*y-scale*]
Give the *width* of the figure and the optional *height*.
The lower-case version **x** is similar to **X** but expects
an *x-scale* and an optional *y-scale*.
The Cartesian linear projection is primarily designed for regular
floating point data. To plot geographical data in a linear
projection, see the upstream GMT documentation
:gmt-docs:`Geographic coordinates
<cookbook/coordinate-transformations.html#geographic-coordinates>`.
To make the linear plot using calendar date/time as input
coordinates, see the GMT documentation
:gmt-docs:`Calendar time coordinates
<cookbook/coordinate-transformations.html#calendar-time-coordinates>`.
"""
import pygmt

Expand Down
11 changes: 8 additions & 3 deletions examples/projections/nongeo/cartesian_logarithmic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
Cartesian logarithmic
=====================
**X**\ *width*\ [**l**]/[*height*\ [**l**]]: Give the *width* of the figure and
the optional *height*. Each axis with a logarithmic transformation
requires **l** after its size argument.
**X**\ *width*\ [**l**][/*height*\ [**l**]] or
**x**\ *x-scale*\ [**l**][/*y-scale*\ [**l**]]
Give the *width* of the figure and the optional *height*.
The lower-case version **x** is similar to **X** but expects
an *x-scale* and an optional *y-scale*.
Each axis with a logarithmic transformation requires **l** after
its size argument.
"""
import numpy as np
import pygmt
Expand Down
12 changes: 8 additions & 4 deletions examples/projections/nongeo/cartesian_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
Cartesian power
===============
**X**\ *width*\ [**p**\ *pvalue*]/[*height*\ [**p**\ *pvalue*]]: Give the
*width* of the figure and the optional argument *height*. Each axis with
a power transformation requires **p** and the exponent for that axis
after its size argument.
**X**\ *width*\ [**p**\ *pvalue*][/*height*\ [**p**\ *pvalue*]] or
**x**\ *x-scale*\ [**p**\ *pvalue*][/*y-scale*\ [**p**\ *pvalue*]]
Give the *width* of the figure and the optional argument *height*.
The lower-case version **x** is similar to **X** but expects
an *x-scale* and an optional *y-scale*.
Each axis with a power transformation requires **p** and the exponent
for that axis after its size argument.
"""
import numpy as np
import pygmt
Expand Down

0 comments on commit dcf1c7f

Please sign in to comment.