Skip to content

Commit 34b72d2

Browse files
committed
Remove sample code from readme and front page
It wasn't tested and was a pain to keep updated
1 parent 7d64080 commit 34b72d2

File tree

4 files changed

+68
-130
lines changed

4 files changed

+68
-130
lines changed

README.rst

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GMT/Python
1313
.. image:: http://img.shields.io/pypi/v/gmt-python.svg?style=flat-square
1414
:alt: Latest version on PyPI
1515
:target: https://pypi.python.org/pypi/gmt-python
16-
.. image:: http://img.shields.io/travis/GenericMappingTools/gmt-python/master.svg?style=flat-square
16+
.. image:: http://img.shields.io/travis/GenericMappingTools/gmt-python/master.svg?style=flat-square&label=linux|osx
1717
:alt: Travis CI build status
1818
:target: https://travis-ci.org/GenericMappingTools/gmt-python
1919
.. image:: http://img.shields.io/coveralls/GenericMappingTools/gmt-python/master.svg?style=flat-square
@@ -35,66 +35,43 @@ Disclaimer
3535
We welcome any feedback and ideas!
3636
Let us know by submitting
3737
`issues on Github <https://github.com/GenericMappingTools/gmt-python/issues>`__
38-
or send us a message on `our Gitter chatroom <https://gitter.im/GenericMappingTools/gmt-python>`__.
38+
or send us a message on our
39+
`Gitter chatroom <https://gitter.im/GenericMappingTools/gmt-python>`__.
3940

4041
See the `documentation <https://genericmappingtools.github.io/gmt-python/>`__
4142
for our design ideas, currently implemented features, how to contribute, and
4243
more.
4344

4445

45-
Goals
46-
-----
46+
Getting started
47+
---------------
4748

48-
* Provide access to GMT modules from Python using the GMT C API (no system
49-
calls).
50-
* API design familiar for veteran GMT users (arguments ``R``,
51-
``J``, etc) with more newbie-friendly alternatives/aliases
52-
(``region=[10, 20, -30, -10]``, ``projection='M'``, etc).
53-
* Input and output using Python native containers: numpy ``ndarray`` or pandas
54-
``DataFrame`` for data tables and `xarray <http://xarray.pydata.org>`__
55-
``Dataset`` for netCDF grids.
56-
* Integration with the `Jupyter notebook <http://jupyter.org/>`__ to display
57-
plots and maps inline.
58-
* Built around the new `GMT modern mode
59-
<http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__.
60-
61-
62-
Examples
63-
--------
64-
65-
This is a basic example to generate a figure and save it to a file:
66-
67-
.. code-block:: python
68-
69-
import gmt
49+
1. `Install <https://genericmappingtools.github.io/gmt-python/install.html>`__
50+
(tested and working on Linux and OSX)
51+
2. Follow the
52+
`First steps <https://genericmappingtools.github.io/gmt-python/first-steps.html>`__
53+
tutorial Jupyter notebook.
54+
3. Take a look at the :ref:`api` for a list of modules that are already
55+
available.
7056

71-
# Start a new figure.
72-
gmt.figure()
73-
# Draw a basemap
74-
gmt.psbasemap(R='10/70/-3/8', J='X4i/3i', B='a', P=True)
75-
# Plot some points with red circles
76-
gmt.psxy('mydata.txt', S='c', G='red')
77-
# Unlike in the command-line, no figure is generated
78-
# unless explicitly asked.
79-
gmt.psconvert(F='myfigure', T='f', A=True, P=True)
8057

58+
Project goals
59+
-------------
8160

82-
On the Jupyter notebook, a PNG preview of the image should also appear.
83-
84-
Notice that the arguments are based on the GMT command-line options. The Python
85-
API also allows aliases for the arguments to make them more explicit and more
86-
familiar to Python users:
87-
88-
89-
.. code-block:: python
90-
91-
import gmt
92-
93-
gmt.figure()
94-
gmt.psbasemap(region=[10, 70, -3, 8], projection='X4i/3i', frame='a',
95-
portrait=True)
96-
gmt.psxy('mydata.txt', style='c', color='red')
97-
gmt.psconvert(prefix='myfigure', fmt='f', crop=True, portrait=True)
61+
* Build a modern Pythonic API that appeals to Python programmers who want to
62+
use GMT.
63+
* Implement readable and explicit aliases for the GMT command-line arguments
64+
(``region`` instead of ``R``, ``projection`` instead of ``J``, etc).
65+
* Use the new `GMT modern mode
66+
<http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__ for
67+
simplified execution and figure generation.
68+
* Interface with the GMT C API directly using
69+
`ctypes <https://docs.python.org/3/library/ctypes.html>`__ (no system calls).
70+
* Integration with the `Jupyter notebook <http://jupyter.org/>`__ to display
71+
plots and maps inline.
72+
* Input and output using Python native containers: numpy ``ndarray`` or pandas
73+
``DataFrame`` for data tables and `xarray <http://xarray.pydata.org>`__
74+
``Dataset`` for netCDF grids.
9875

9976

10077

@@ -113,6 +90,8 @@ Working features and TODO
11390
destroyed when the program ends. This eliminates the need for ``begin`` and
11491
``end`` in the Python API.
11592
- [X] Minimal working code producing a figure from data on disk
93+
- [ ] Implement an object-oriented API using a ``Figure`` class (similar to
94+
matplotlib).
11695
- [ ] Wrapper for the GMT VirtualFile machinery to allow communicating data in
11796
memory to the modules
11897
- [ ] Wrapper for ``GMT_DATA`` to pass in tabular data from numpy arrays

doc/LICENSE.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

doc/design.rst

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,6 @@ We aim to learn from these attempts and create a library that interfaces with
3131
the C API and provides a Pythonic API for GMT.
3232

3333

34-
Goals
35-
-----
36-
37-
* Provide access to GMT modules from Python using the GMT C API (no system
38-
calls).
39-
* API design familiar for veteran GMT users (arguments ``R``,
40-
``J``, etc) with more newbie-friendly alternatives/aliases
41-
(``region=[10, 20, -30, -10]``, ``projection='M'``, etc).
42-
* Input and output using Python native containers: numpy ``ndarray`` or pandas
43-
``DataFrame`` for data tables and `xarray <http://xarray.pydata.org>`__
44-
``Dataset`` for netCDF grids.
45-
* Integration with the `Jupyter notebook <http://jupyter.org/>`__ to display
46-
plots and maps inline.
47-
* Built around the new `GMT modern mode
48-
<http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__.
49-
50-
5134
About modern mode
5235
-----------------
5336

doc/index.rst

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,32 @@ GMT/Python
33

44
**A Python interface for the Generic Mapping Tools**
55

6-
Run GMT in your Python programs:
7-
8-
.. code-block:: python
9-
10-
import gmt
11-
12-
# Start a new figure.
13-
gmt.figure()
14-
# Creat a basemap and coastlines with the Mercator projection
15-
# Use the command line arguments you know (like R)
16-
# or more Pythonic and descriptive aliases.
17-
gmt.pscoast(region=[130, 150, 35, 50], projection='M6i',
18-
frame='afg', land='gray', water='lightblue',
19-
shorelines=True)
20-
# Plot the quake data from the GMT tutorial
21-
gmt.psxy(data='@tut_quakes.ngdc', style='c0.3c', color='blue',
22-
pen='faint', i='4,3')
23-
# Unlike the GMT command-line interface, no figure
24-
# file is generated unless explicitly commanded
25-
gmt.psconvert(prefix='tut_quakes', fmt='G', dpi=200,
26-
crop=True, portrait=True)
27-
28-
29-
.. image:: _static/front-page-example.png
30-
:width: 80%
31-
:alt: Example figure
32-
:align: center
33-
34-
35-
Get started
36-
-----------
37-
38-
1. Start with the :ref:`first-steps.ipynb` tutorial Jupyter notebook.
39-
2. After that, take a look at the :ref:`api` for a list of modules that are
40-
already available.
6+
Getting started
7+
---------------
8+
9+
1. :ref:`Install <install>` (tested and working on Linux and OSX)
10+
2. Follow the :ref:`first-steps.ipynb` tutorial Jupyter notebook.
11+
3. Take a look at the :ref:`api` for a list of modules that are already
12+
available.
13+
14+
15+
Project goals
16+
-------------
17+
18+
* Build a modern Pythonic API that appeals to Python programmers who want to
19+
use GMT.
20+
* Implement readable and explicit aliases for the GMT command-line arguments
21+
(``region`` instead of ``R``, ``projection`` instead of ``J``, etc).
22+
* Use the new `GMT modern mode
23+
<http://gmt.soest.hawaii.edu/projects/gmt/wiki/Modernization>`__ for
24+
simplified execution and figure generation.
25+
* Interface with the GMT C API directly using
26+
`ctypes <https://docs.python.org/3/library/ctypes.html>`__ (no system calls).
27+
* Integration with the `Jupyter notebook <http://jupyter.org/>`__ to display
28+
plots and maps inline.
29+
* Input and output using Python native containers: numpy ``ndarray`` or pandas
30+
``DataFrame`` for data tables and `xarray <http://xarray.pydata.org>`__
31+
``Dataset`` for netCDF grids.
4132

4233

4334
Disclaimer
@@ -46,11 +37,21 @@ Disclaimer
4637
**This package in early stages of design and implementation.**
4738

4839
We welcome any feedback and ideas!
49-
Code contributions are also very welcome.
5040
Let us know by submitting
5141
`issues on Github <https://github.com/GenericMappingTools/gmt-python/issues>`__
52-
or send us a message on `our Gitter chatroom <https://gitter.im/GenericMappingTools/gmt-python>`__.
42+
or send us a message on our
43+
`Gitter chatroom <https://gitter.im/GenericMappingTools/gmt-python>`__.
44+
45+
See the `documentation <https://genericmappingtools.github.io/gmt-python/>`__
46+
for our design ideas, currently implemented features, how to contribute, and
47+
more.
48+
49+
50+
License
51+
-------
5352

53+
GMT/Python is free software: you can redistribute it and/or modify it under the
54+
terms of the :ref:`BSD 3-clause License <license>`.
5455

5556
.. toctree::
5657
:maxdepth: 2

0 commit comments

Comments
 (0)