Skip to content

Commit c9ce377

Browse files
seismanleouieda
authored andcommitted
Fix more gmt and GMT/Python to PyGMT (#266)
1 parent 8c96029 commit c9ce377

16 files changed

+58
-58
lines changed

doc/CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
www.gmtpython.xyz
1+
www.pygmt.org

doc/_static/gmt-python-banner.svg

Lines changed: 1 addition & 1 deletion
Loading

doc/_static/gmt-python-logo.svg

Lines changed: 1 addition & 1 deletion
Loading

doc/api/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Miscellaneous
7272
Datasets
7373
--------
7474

75-
GMT/Python provides access to GMT's datasets through the :mod:`pygmt.datasets` package.
75+
PyGMT provides access to GMT's datasets through the :mod:`pygmt.datasets` package.
7676
These functions will download the datasets automatically the first time they are used
7777
and store them in the GMT cache folder.
7878

doc/install.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Installing
1717
Which Python?
1818
-------------
1919

20-
You'll need **Python 3.6 or greater** to run GMT/Python.
20+
You'll need **Python 3.6 or greater** to run PyGMT.
2121

2222
We recommend using the `Anaconda <http://continuum.io/downloads#all>`__ Python
2323
distribution to ensure you have all dependencies installed and the ``conda``
@@ -31,17 +31,17 @@ Which GMT?
3131

3232
You'll need the latest development version available from
3333
`the GitHub repository <https://github.com/GenericMappingTools/gmt>`__.
34-
GMT/Python is based on GMT 6, **which has not yet been officially released**.
34+
PyGMT is based on GMT 6, **which has not yet been officially released**.
3535

3636
We need the very latest GMT since there are many changes being made to GMT itself in
37-
response to the development of GMT/Python, mainly the new
37+
response to the development of PyGMT, mainly the new
3838
`modern execution mode <http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__.
3939

4040

4141
Dependencies
4242
------------
4343

44-
GMT/Python requires the following libraries:
44+
PyGMT requires the following libraries:
4545

4646
* `numpy <http://www.numpy.org/>`__
4747
* `pandas <https://pandas.pydata.org/>`__
@@ -56,7 +56,7 @@ The following are optional (but recommended) dependencies:
5656
Installing GMT
5757
--------------
5858

59-
Unfortunately, you'll have to build GMT from source in order to get GMT/Python working.
59+
Unfortunately, you'll have to build GMT from source in order to get PyGMT working.
6060
Please follow the instructions at http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT
6161

6262
.. note::
@@ -67,11 +67,11 @@ Please follow the instructions at http://gmt.soest.hawaii.edu/projects/gmt/wiki/
6767
packages available again. Please bear with us.
6868

6969

70-
Installing GMT/Python
71-
---------------------
70+
Installing PyGMT
71+
----------------
7272

7373
Now that you have GMT installed and your conda environment activated,
74-
use ``pip`` to install the latest source of GMT/Python from Github::
74+
use ``pip`` to install the latest source of PyGMT from Github::
7575

7676
pip install https://github.com/GenericMappingTools/pygmt/archive/master.zip
7777

@@ -87,30 +87,30 @@ This will allow you to use the ``gmt`` library from Python.
8787
Testing your install
8888
--------------------
8989

90-
GMT/Python ships with a full test suite.
90+
PyGMT ships with a full test suite.
9191
You can run our tests after you install it but you will need a few extra dependencies as
9292
well (be sure to have your conda env activated)::
9393

9494
conda install pytest pytest-mpl sphinx jinja2 docutils ipython
9595

9696
Test your installation by running the following inside a Python interpreter::
9797

98-
import gmt
99-
gmt.test()
98+
import pygmt
99+
pygmt.test()
100100

101101

102102
Finding the GMT shared library
103103
------------------------------
104104

105-
Sometimes, GMT/Python will be unable to find the correct version of the GMT shared
105+
Sometimes, PyGMT will be unable to find the correct version of the GMT shared
106106
library.
107107
This can happen if you have multiple versions of GMT installed.
108108

109-
You can tell GMT/Python exactly where to look for ``libgmt`` by setting the
109+
You can tell PyGMT exactly where to look for ``libgmt`` by setting the
110110
``GMT_LIBRARY_PATH`` environment variable.
111111
This should be set to the directory where ``libgmt.so`` (or ``.dylib``) is found.
112112
**Only use this as a last resort**.
113-
Setting the path in this way means that GMT/Python will not be able to easily find the
113+
Setting the path in this way means that PyGMT will not be able to easily find the
114114
correct ``libgmt`` when you're changing conda environments.
115115

116116
If you installed GMT using conda and the instructions above, place the following in your

doc/sphinxext.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Sphinx Extension
44
================
55

6-
We provide a `Sphinx <http://www.sphinx-doc.org/>`__ extension for including GMT/Python
6+
We provide a `Sphinx <http://www.sphinx-doc.org/>`__ extension for including PyGMT
77
figures in your documentation. The extension defines the ``gmt-plot`` directive that
88
will take execute the given code and insert the generated figure into the document.
99

doc/tutorials/first-steps.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# First Steps with GMT/Python\n",
7+
"# First Steps with PyGMT\n",
88
"\n",
99
"\n",
10-
"This tutorial will get you started with the basic usage of GMT/Python.\n",
10+
"This tutorial will get you started with the basic usage of PyGMT.\n",
1111
"Some of the examples shown here are from the [GMT Tutorial](http://gmt.soest.hawaii.edu/doc/latest/GMT_Tutorial.html#session-one).\n",
1212
"\n",
1313
"## Loading the library\n",
@@ -22,7 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"import gmt"
25+
"import pygmt"
2626
]
2727
},
2828
{
@@ -31,15 +31,15 @@
3131
"source": [
3232
"## Our first map\n",
3333
"\n",
34-
"All figure generation in GMT/Python is handled by the `gmt.Figure` class. \n",
34+
"All figure generation in PyGMT is handled by the `pygmt.Figure` class. \n",
3535
"It has methods to add layers to your figure, like a basemap, coastlines, and data."
3636
]
3737
},
3838
{
3939
"cell_type": "markdown",
4040
"metadata": {},
4141
"source": [
42-
"We start a new figure by creating an instance of `gmt.Figure`:"
42+
"We start a new figure by creating an instance of `pygmt.Figure`:"
4343
]
4444
},
4545
{
@@ -48,7 +48,7 @@
4848
"metadata": {},
4949
"outputs": [],
5050
"source": [
51-
"fig = gmt.Figure()"
51+
"fig = pygmt.Figure()"
5252
]
5353
},
5454
{
@@ -110,7 +110,7 @@
110110
"\n",
111111
"You'll probably have noticed several things that are different from classic command-line GMT.\n",
112112
"Many of these changes reflect the new GMT [modern execution mode](http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization) that will be part of the future 6.0 release.\n",
113-
"A few are GMT/Python exclusive (like the long argument names).\n",
113+
"A few are PyGMT exclusive (like the long argument names).\n",
114114
"\n",
115115
"1. The name of method is `coast` instead of `pscoast`. As a general rule, all `ps*` modules had their `ps` removed. The exceptions are: `psxy == plot`, `psxyz == plot3d`, and `psscale == colorbar`.\n",
116116
"2. The arguments don't use the GMT 1-letter syntax (R, J, B, etc). Those are still available as aliases and the methods will accept them (see below). \n",
@@ -132,7 +132,7 @@
132132
"metadata": {},
133133
"outputs": [],
134134
"source": [
135-
"fig_alias = gmt.Figure()\n",
135+
"fig_alias = pygmt.Figure()\n",
136136
"fig_alias.coast(R='-90/-70/0/20', J='M6i', G='gray', S=\"blue\", B=True)\n",
137137
"fig_alias.show()"
138138
]

doc/tutorials/plot-data-points.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Plotting data points\n",
88
"\n",
9-
"This tutorial will show you how to plot data points with GMT/Python.\n",
9+
"This tutorial will show you how to plot data points with PyGMT.\n",
1010
"\n",
1111
"Start by importing the `gmt` Python package:"
1212
]
@@ -17,7 +17,7 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"import gmt"
20+
"import pygmt"
2121
]
2222
},
2323
{
@@ -26,7 +26,7 @@
2626
"source": [
2727
"## Cartesian plots\n",
2828
"\n",
29-
"The `gmt.Figure` class has a `plot` method for displaying points and lines. Let's make a Cartesian x, y plot using some random data generated using numpy:"
29+
"The `pygmt.Figure` class has a `plot` method for displaying points and lines. Let's make a Cartesian x, y plot using some random data generated using numpy:"
3030
]
3131
},
3232
{
@@ -68,7 +68,7 @@
6868
"metadata": {},
6969
"outputs": [],
7070
"source": [
71-
"fig = gmt.Figure()\n",
71+
"fig = pygmt.Figure()\n",
7272
"# Create a 6x6 inch basemap using the data region\n",
7373
"fig.basemap(region=region, projection='X6i', frame=True)\n",
7474
"# Plot using triangles (i) of 0.3 cm\n",
@@ -89,7 +89,7 @@
8989
"metadata": {},
9090
"outputs": [],
9191
"source": [
92-
"fig = gmt.Figure()\n",
92+
"fig = pygmt.Figure()\n",
9393
"fig.basemap(region=region, projection='X6i', frame=True)\n",
9494
"fig.plot(x, y, style='ic', color='black', sizes=magnitude/10)\n",
9595
"fig.show()"
@@ -128,7 +128,7 @@
128128
"metadata": {},
129129
"outputs": [],
130130
"source": [
131-
"fig = gmt.Figure()\n",
131+
"fig = pygmt.Figure()\n",
132132
"fig.basemap(region=region, projection='X6i', frame=True)\n",
133133
"fig.plot(data='first-steps-data.txt', style='cc', color='red', \n",
134134
" columns=[0, 1, '2s0.1'])\n",
@@ -143,7 +143,7 @@
143143
"\n",
144144
"GMT shines when plotting data on a map. We can use some **sample data** that is packaged with GMT to try this out. They can be accessed using special file names that begin with an `@` symbol, for example `@tut_quakes.ngdc`. You can supply these names as the `data` argument in `Figure.plot` and other plotting functions. If you don't have the files already, they are automatically downloaded by GMT and saved to a cache directory (usually `~/.gmt/cache`).\n",
145145
"\n",
146-
"The `gmt.datasets` package allows easy access to these data files as Python data types. For example, we can access the sample dataset of tsunami generating earthquakes around Japan (`@tut_quakes.ngdc`) as a `pandas.DataFrame` using the `datasets.load_japan_quakes` function:"
146+
"The `pygmt.datasets` package allows easy access to these data files as Python data types. For example, we can access the sample dataset of tsunami generating earthquakes around Japan (`@tut_quakes.ngdc`) as a `pandas.DataFrame` using the `datasets.load_japan_quakes` function:"
147147
]
148148
},
149149
{
@@ -152,7 +152,7 @@
152152
"metadata": {},
153153
"outputs": [],
154154
"source": [
155-
"from gmt.datasets import load_japan_quakes\n",
155+
"from pygmt.datasets import load_japan_quakes\n",
156156
"\n",
157157
"quakes = load_japan_quakes()\n",
158158
"quakes.head()"
@@ -183,7 +183,7 @@
183183
"metadata": {},
184184
"outputs": [],
185185
"source": [
186-
"fig = gmt.Figure()\n",
186+
"fig = pygmt.Figure()\n",
187187
"fig.coast(region=quakes_region, projection='M6i', frame=True, \n",
188188
" land='black', water='skyblue')\n",
189189
"fig.plot(x=quakes.longitude, y=quakes.latitude, \n",
@@ -204,7 +204,7 @@
204204
"metadata": {},
205205
"outputs": [],
206206
"source": [
207-
"fig = gmt.Figure()\n",
207+
"fig = pygmt.Figure()\n",
208208
"fig.coast(region=quakes_region, projection='M6i', frame=True, \n",
209209
" land='black', water='skyblue')\n",
210210
"fig.plot(x=quakes.longitude, y=quakes.latitude, \n",
@@ -226,7 +226,7 @@
226226
"metadata": {},
227227
"outputs": [],
228228
"source": [
229-
"fig = gmt.Figure()\n",
229+
"fig = pygmt.Figure()\n",
230230
"fig.coast(region=quakes_region, projection='M6i', frame=True, \n",
231231
" land='black', water='skyblue')\n",
232232
"fig.plot(x=quakes.longitude, y=quakes.latitude, \n",
@@ -256,7 +256,7 @@
256256
"metadata": {},
257257
"outputs": [],
258258
"source": [
259-
"fig = gmt.Figure()\n",
259+
"fig = pygmt.Figure()\n",
260260
"fig.coast(region=quakes_region, projection='X6id/6id', land='gray')\n",
261261
"fig.plot(x=quakes.longitude, y=quakes.latitude, \n",
262262
" sizes=0.02*2**quakes.magnitude,\n",

pygmt/base_plotting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _preprocess(self, **kwargs): # pylint: disable=no-self-use
3030
insert special arguments into the kwargs or make any actions that are
3131
required before ``call_module``.
3232
33-
For example, the :class:`gmt.Figure` needs this to tell the GMT modules
33+
For example, the :class:`pygmt.Figure` needs this to tell the GMT modules
3434
to plot to a specific figure.
3535
3636
This is a dummy method that does nothing.

pygmt/clib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Low-level wrapper for the GMT C API.
33
4-
The :class:`gmt.clib.Session` class wraps the GMT C shared library (``libgmt``)
4+
The :class:`pygmt.clib.Session` class wraps the GMT C shared library (``libgmt``)
55
with a pythonic interface.
66
Access to the C library is done through :py:mod:`ctypes`.
77

0 commit comments

Comments
 (0)