From 0ee8ac32a39ed019fde1be0c9fa9386e49f28702 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:04:16 -0400 Subject: [PATCH 01/10] DOC : merged offsetbox.rst into artists_api.rst --- doc/api/artist_api.rst | 19 ++++++++++++++----- doc/api/offsetbox.rst | 12 ------------ 2 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 doc/api/offsetbox.rst diff --git a/doc/api/artist_api.rst b/doc/api/artist_api.rst index 2ec41bb5c94f..8680be5b9f73 100644 --- a/doc/api/artist_api.rst +++ b/doc/api/artist_api.rst @@ -4,11 +4,11 @@ artists ******* -.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text +.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text matplotlib.offsetbox :parts: 2 :mod:`matplotlib.artist` -============================= +======================== .. automodule:: matplotlib.artist :members: @@ -17,7 +17,7 @@ artists :mod:`matplotlib.lines` -============================= +======================= .. automodule:: matplotlib.lines :members: @@ -25,7 +25,7 @@ artists :show-inheritance: :mod:`matplotlib.patches` -============================= +========================= .. automodule:: matplotlib.patches :members: @@ -33,9 +33,18 @@ artists :show-inheritance: :mod:`matplotlib.text` -============================= +====================== .. automodule:: matplotlib.text :members: :undoc-members: :show-inheritance: + + +:mod:`matplotlib.offsetbox` +=========================== + +.. automodule:: matplotlib.offsetbox + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/api/offsetbox.rst b/doc/api/offsetbox.rst deleted file mode 100644 index 1ed7e55504db..000000000000 --- a/doc/api/offsetbox.rst +++ /dev/null @@ -1,12 +0,0 @@ -********* -offsetbox -********* - - -:mod:`matplotlib.offsetbox` -=========================== - -.. automodule:: matplotlib.offsetbox - :members: - :undoc-members: - :show-inheritance: From 6838075d2bb1569237ebc193abf8a9058109652a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:18:09 -0400 Subject: [PATCH 02/10] DOC : added examples index to contents page I assume there was a reason for only putting the examples in the html docs, but I don't see it. --- doc/contents.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contents.rst b/doc/contents.rst index d5c20acd5f01..0765e13130f9 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -20,10 +20,10 @@ Overview devel/index.rst mpl_toolkits/index.rst api/index.rst + examples/index.rst glossary/index.rst .. htmlonly:: - - `Examples `_ * :ref:`genindex` * :ref:`modindex` From 80aa2277005b5c702b32c456e4266882afd9fc11 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:45:33 -0400 Subject: [PATCH 03/10] DOC : removed out-dated example Removed example of how parse output from svn logs. --- examples/misc/developer_commit_history.py | 45 ----------------------- 1 file changed, 45 deletions(-) delete mode 100644 examples/misc/developer_commit_history.py diff --git a/examples/misc/developer_commit_history.py b/examples/misc/developer_commit_history.py deleted file mode 100644 index e4577c73e73b..000000000000 --- a/examples/misc/developer_commit_history.py +++ /dev/null @@ -1,45 +0,0 @@ -from __future__ import print_function -""" -report how many days it has been since each developer committed. You -must do an - -svn log > log.txt - -and place the output next to this file before running - -""" -import os, datetime - -import matplotlib.cbook as cbook - -todate = cbook.todate('%Y-%m-%d') -today = datetime.date.today() -if not os.path.exists('log.txt'): - print('You must place the "svn log" output into a file "log.txt"') - raise SystemExit - -parse = False - -lastd = dict() -for line in file('log.txt'): - if line.startswith('--------'): - parse = True - continue - - if parse: - parts = [part.strip() for part in line.split('|')] - developer = parts[1] - dateparts = parts[2].split(' ') - ymd = todate(dateparts[0]) - - - if developer not in lastd: - lastd[developer] = ymd - - parse = False - -dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()] - -dsu.sort() -for timedelta, developer in dsu: - print('%s : %d'%(developer, timedelta)) From b644c4ec89ee61d7ebcd5bd08602c033fee66d08 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:47:07 -0400 Subject: [PATCH 04/10] DOC : fixed section titles Parameter -> Parameters Example -> Examples --- lib/matplotlib/axes/_base.py | 8 ++++---- lib/matplotlib/axis.py | 4 ++-- lib/matplotlib/cbook.py | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index bc5d9c884bfe..612a628f32a7 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -2622,8 +2622,8 @@ def get_xticklabels(self, minor=False, which=None): Get the x tick labels as a list of :class:`~matplotlib.text.Text` instances. - Parameter - --------- + Parameters + ---------- minor : bool If True return the minor ticklabels, else return the major ticklabels @@ -2875,8 +2875,8 @@ def get_yticklabels(self, minor=False, which=None): Get the x tick labels as a list of :class:`~matplotlib.text.Text` instances. - Parameter - --------- + Parameters + ---------- minor : bool If True return the minor ticklabels, else return the major ticklabels diff --git a/lib/matplotlib/axis.py b/lib/matplotlib/axis.py index 6d31f1ba9c3b..80ceed5de7e3 100644 --- a/lib/matplotlib/axis.py +++ b/lib/matplotlib/axis.py @@ -1171,8 +1171,8 @@ def get_ticklabels(self, minor=False, which=None): Get the x tick labels as a list of :class:`~matplotlib.text.Text` instances. - Parameter - --------- + Parameters + ---------- minor : bool If True return the minor ticklabels, else return the major ticklabels diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index 49bdf3fb2534..84540887b95a 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -120,8 +120,8 @@ def new_function(): obj_type : str, optional The object type being deprecated. - Example - ------- + Examples + -------- # To warn of the deprecation of "matplotlib.name_of_module" warn_deprecated('1.4.0', name='matplotlib.name_of_module', obj_type='module') @@ -172,8 +172,8 @@ def new_function(): If True, uses a PendingDeprecationWarning instead of a DeprecationWarning. - Example - ------- + Examples + -------- @deprecated('1.4.0') def the_function_to_deprecate(): pass From a5206eb3d31d406b56141ae1be979263d77a8425 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:47:33 -0400 Subject: [PATCH 05/10] DOC : fixed section hierarchy --- doc/devel/portable_code.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/devel/portable_code.rst b/doc/devel/portable_code.rst index a1418cca8200..dd1f9f3dd6cd 100644 --- a/doc/devel/portable_code.rst +++ b/doc/devel/portable_code.rst @@ -10,7 +10,7 @@ recommended solutions. It is not a complete guide to Python 2 and 3 compatibility. Welcome to the ``__future__`` ------------------------------ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The top of every `.py` file should include the following:: @@ -26,7 +26,7 @@ gets used *a lot*:: import six Finding places to use six -------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^ The only way to make sure code works on both Python 2 and 3 is to make sure it is covered by unit tests. @@ -41,7 +41,7 @@ The `six `_ documentation serves as a good reference for the sorts of things that need to be updated. The dreaded ``\u`` escapes --------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^ When `from __future__ import unicode_literals` is used, all string literals (not preceded with a `b`) will become unicode literals. @@ -86,7 +86,7 @@ of that and still support Python 2:: '\\u' Iteration ---------- +^^^^^^^^^ The behavior of the methods for iterating over the items, values and keys of a dictionary has changed in Python 3. Additionally, other @@ -111,7 +111,7 @@ Python 2 Python 3 six ============================== ============================== ============================== Numpy-specific things ---------------------- +^^^^^^^^^^^^^^^^^^^^^ When specifying dtypes, all strings must be byte strings on Python 2 and unicode strings on Python 3. The best way to handle this is to From 53e30b70f7c73ed7c77c42c7d698b4d9cff22cf2 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:48:05 -0400 Subject: [PATCH 06/10] DOC : fixed rst formatting --- doc/api/patheffects_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/patheffects_api.rst b/doc/api/patheffects_api.rst index d2f909e7c0af..0efcc14a114a 100644 --- a/doc/api/patheffects_api.rst +++ b/doc/api/patheffects_api.rst @@ -4,7 +4,7 @@ patheffects :mod:`matplotlib.patheffects` -======================= +============================= .. automodule:: matplotlib.patheffects :members: From 62de65d31d1d218a6bdc6ca95d632c7ee22dca8d Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 9 Jun 2014 22:49:02 -0400 Subject: [PATCH 07/10] DOC : commented out non-existent file --- doc/api/index_backend_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/index_backend_api.rst b/doc/api/index_backend_api.rst index 5ca377150e2f..6dbccb231280 100644 --- a/doc/api/index_backend_api.rst +++ b/doc/api/index_backend_api.rst @@ -9,6 +9,6 @@ backends backend_qt4agg_api.rst backend_wxagg_api.rst backend_pdf_api.rst - backend_webagg.rst +.. backend_webagg.rst dviread.rst type1font.rst From 05e27666dd669a9a164b06826923c11726bb6f23 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 10 Jun 2014 00:04:29 -0400 Subject: [PATCH 08/10] DOC : updated mpl_toolkits Added section on high-level plotting with seaborn and ggplot. Added mpldatacursor and prettyplotlib. --- doc/mpl_toolkits/index.rst | 56 +++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 1166e3ff63de..b6fc7df21bb6 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -22,8 +22,9 @@ Toolkits are collections of application-specific functions that extend matplotli .. _toolkit_basemap: -Basemap (*Not distributed with matplotlib*) -============================================ +Basemap +======= +(*Not distributed with matplotlib*) Plots data on map projections, with continental and political boundaries, see `basemap `_ @@ -34,8 +35,10 @@ docs. -Cartopy (*Not distributed with matplotlib*) -============================================ +Cartopy +======= +(*Not distributed with matplotlib*) + An alternative mapping library written for matplotlib ``v1.2`` and beyond. `Cartopy `_ builds on top of matplotlib to provide object oriented map projection definitions and close @@ -69,8 +72,9 @@ Excel. This toolkit ships with matplotlib, but requires .. _toolkit_natgrid: -Natgrid (*Not distributed with matplotlib*) -=========================================== +Natgrid +======= +(*Not distributed with matplotlib*) mpl_toolkits.natgrid is an interface to natgrid C library for gridding irregularly spaced data. This requires a separate installation of the @@ -82,7 +86,7 @@ page. .. _toolkit_mplot3d: mplot3d -=========== +======= :ref:`mpl_toolkits.mplot3d ` provides some basic 3D plotting (scatter, surf, line, mesh) tools. Not the fastest or feature complete 3D library out @@ -101,3 +105,41 @@ ease displaying multiple images in matplotlib. The AxesGrid toolkit is distributed with matplotlib source. .. image:: /_static/demo_axes_grid.png + +.. _toolkit_mpldatacursor: + +MplDataCursor +============= +(*Not distributed with matplotlib*) + +`MplDataCursor `_ is a +toolkit written by Joe Kington to provide interactive "data cursors" +(clickable annotation boxes) for matplotlib. + +prettyplotlib +============= +`prettyplotlib `_ is an extension +to matplotlib which changes many of the defaults to make plots some +consider more attractive. + +################### +High-Level Plotting +################### + +Several projects have started to provide a higher-level interface to +matplotlib. These are independent projects. + +Seborn +====== +(*Not distributed with matplotlib*) + +`Seaborn `_ is a Python +visualization library based on matplotlib. It provides a high-level +interface for drawing attractive statistical graphics. + +ggplot +====== +(*Not distributed with matplotlib*) + +`ggplot `_ is a port of the R ggplot2 +to python based on matplotlib. From b2febbf556872fa58468592fdb516e5cc8b29cf7 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 10 Jun 2014 20:18:49 -0400 Subject: [PATCH 09/10] DOC : fixed typo --- doc/mpl_toolkits/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index b6fc7df21bb6..3e7eff7b5838 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -129,11 +129,11 @@ High-Level Plotting Several projects have started to provide a higher-level interface to matplotlib. These are independent projects. -Seborn -====== +seaborn +======= (*Not distributed with matplotlib*) -`Seaborn `_ is a Python +`seaborn `_ is a Python visualization library based on matplotlib. It provides a high-level interface for drawing attractive statistical graphics. From a85fd34f0d68f9ef9862ec1a2e55d2060d898478 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Tue, 10 Jun 2014 23:59:09 -0400 Subject: [PATCH 10/10] DOC : updated seaborn blurb - use blurb suggest by @mwaskom - added links --- doc/mpl_toolkits/index.rst | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 3e7eff7b5838..dec4c5fe60ba 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -116,12 +116,15 @@ MplDataCursor toolkit written by Joe Kington to provide interactive "data cursors" (clickable annotation boxes) for matplotlib. +.. _prettyplotlib: + prettyplotlib ============= `prettyplotlib `_ is an extension to matplotlib which changes many of the defaults to make plots some consider more attractive. +.. _hl_plotting: ################### High-Level Plotting ################### @@ -129,13 +132,18 @@ High-Level Plotting Several projects have started to provide a higher-level interface to matplotlib. These are independent projects. +.. _seaborn: + seaborn ======= (*Not distributed with matplotlib*) -`seaborn `_ is a Python -visualization library based on matplotlib. It provides a high-level -interface for drawing attractive statistical graphics. +`seaborn `_ is a high +level interface for drawing statistical graphics with matplotlib. It +aims to make visualization a central part of exploring and +understanding complex datasets. + +.. _ggplot: ggplot ======