From 999786f8af7ba9c697c29d9646b416f5d8d3d35c Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 14:27:26 +0100 Subject: [PATCH 01/32] Move axesgrid1 api docs to axesgrid1 --- doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst | 12 ++++++------ doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst | 8 ++++---- doc/mpl_toolkits/axes_grid/api/axes_size_api.rst | 7 +++---- doc/mpl_toolkits/axes_grid/api/index.rst | 6 +++--- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst index fc090530e664..df3610d680ed 100644 --- a/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst +++ b/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst @@ -1,18 +1,18 @@ -:mod:`mpl_toolkits.axes_grid.axes_divider` -========================================== +:mod:`mpl_toolkits.axes_grid1.axes_divider` +=========================================== -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.Divider +.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.Divider :members: :undoc-members: -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesLocator +.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.AxesLocator :members: :undoc-members: -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.SubplotDivider +.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.SubplotDivider :members: -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesDivider +.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.AxesDivider :members: diff --git a/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst index 15fa8bd2a2c1..c52efc8ff102 100644 --- a/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst +++ b/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst @@ -1,11 +1,11 @@ -:mod:`mpl_toolkits.axes_grid.axes_grid` -======================================= +:mod:`mpl_toolkits.axes_grid1.axes_grid` +======================================== -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.Grid +.. autoclass:: mpl_toolkits.axes_grid1.axes_grid.Grid :members: :undoc-members: -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.ImageGrid +.. autoclass:: mpl_toolkits.axes_grid1.axes_grid.ImageGrid :members: :undoc-members: diff --git a/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst b/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst index 1238bfd903b2..06a0b053a9f2 100644 --- a/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst +++ b/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst @@ -1,6 +1,5 @@ -:mod:`mpl_toolkits.axes_grid.axes_size` -======================================= +:mod:`mpl_toolkits.axes_grid1.axes_size` +======================================== -.. automodule:: mpl_toolkits.axes_grid.axes_size +.. automodule:: mpl_toolkits.axes_grid1.axes_size :members: Fixed, Scaled, AxesX, AxesY, MaxWidth, MaxHeight, Fraction, Padded, from_any - diff --git a/doc/mpl_toolkits/axes_grid/api/index.rst b/doc/mpl_toolkits/axes_grid/api/index.rst index 672336ee2dbf..53db4fb7f88f 100644 --- a/doc/mpl_toolkits/axes_grid/api/index.rst +++ b/doc/mpl_toolkits/axes_grid/api/index.rst @@ -9,9 +9,6 @@ .. toctree:: - axes_size_api.rst - axes_divider_api.rst - axes_grid_api.rst axis_artist_api.rst @@ -25,4 +22,7 @@ .. toctree:: anchored_artists_api.rst + axes_size_api.rst + axes_divider_api.rst + axes_grid_api.rst inset_locator_api.rst From 8f461a220ca3ee097e47e0b60617d2b9c89fce45 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 14:44:51 +0100 Subject: [PATCH 02/32] Move non bundled packages from toolkits to resources --- doc/mpl_toolkits/index.rst | 127 ------------------------------------- doc/resources/index.rst | 122 +++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 127 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index ba3ae7efc305..924a8ad65b93 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -17,45 +17,6 @@ Toolkits Toolkits are collections of application-specific functions that extend matplotlib. -.. _toolkits-mapping: - - -Mapping Toolkits -**************** - - -.. _toolkit_basemap: - -Basemap -======= -(*Not distributed with matplotlib*) - -Plots data on map projections, with continental and political -boundaries, see `basemap `_ -docs. - -.. image:: /_static/basemap_contour1.png - :height: 400px - - - -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 -integration with Shapely for powerful yet easy-to-use vector data processing -tools. An example plot from the -`Cartopy gallery `_: - -.. image:: /_static/cartopy_hurricane_katrina_01_00.png - :height: 400px - - -.. _toolkits-shipped: - General Toolkits **************** @@ -96,17 +57,6 @@ 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. - - .. _toolkit_gtk: GTK Tools @@ -125,80 +75,3 @@ Excel Tools mpl_toolkits.exceltools provides some utilities for working with Excel. This toolkit ships with matplotlib, but requires `xlwt `_ - - -.. _toolkit_natgrid: - -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 -`natgrid toolkit `__. - - -.. _toolkit_matplotlibvenn: - -Matplotlib-Venn -=============== -(*Not distributed with matplotlib*) - -`Matplotlib-Venn `_ provides a set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn diagrams. - -mplstereonet -=============== -(*Not distributed with matplotlib*) - -`mplstereonet `_ provides stereonets for plotting and analyzing orientation data in Matplotlib. - - -.. _hl_plotting: - -High-Level Plotting -******************* - -Several projects have started to provide a higher-level interface to -matplotlib. These are independent projects. - -.. _toolkit_seaborn: - -seaborn -======= -(*Not distributed with matplotlib*) - -`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. - -.. _toolkit_ggplot: - -ggplot -====== -(*Not distributed with matplotlib*) - -`ggplot `_ is a port of the R ggplot2 -to python based on matplotlib. - - -.. _toolkit_prettyplotlib: - -prettyplotlib -============= -(*Not distributed with matplotlib*) - -`prettyplotlib `_ is an extension -to matplotlib which changes many of the defaults to make plots some -consider more attractive. - - -iTerm2 terminal backend -======================= -(*Not distributed with matplotlib*) - -`matplotlib_iterm2 `_ is an -external matplotlib backend uses iTerm2 nightly build inline image display -feature. - -.. image:: /_static/matplotlib_iterm2_demo.png diff --git a/doc/resources/index.rst b/doc/resources/index.rst index 15401b716f29..9da2874af856 100644 --- a/doc/resources/index.rst +++ b/doc/resources/index.rst @@ -61,3 +61,125 @@ * `Anatomy of Matplotlib - IPython Notebooks `_ by Benjamin Root + +================= + Related Packages +================= + +Mapping Toolkits +**************** + + +.. _toolkit_basemap: + +Basemap +======= + +Plots data on map projections, with continental and political +boundaries, see `basemap `_ +docs. + +.. image:: /_static/basemap_contour1.png + :height: 400px + + + +Cartopy +======= + +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 +integration with Shapely for powerful yet easy-to-use vector data processing +tools. An example plot from the +`Cartopy gallery `_: + +.. image:: /_static/cartopy_hurricane_katrina_01_00.png + :height: 400px + + +.. _toolkits-shipped: + + +General Toolkits +**************** + + +.. _toolkit_mpldatacursor: + +MplDataCursor +============= + +`MplDataCursor `_ is a +toolkit written by Joe Kington to provide interactive "data cursors" +(clickable annotation boxes) for matplotlib. + + +.. _toolkit_natgrid: + +Natgrid +======= + +mpl_toolkits.natgrid is an interface to natgrid C library for gridding +irregularly spaced data. This requires a separate installation of the +`natgrid toolkit `__. + + +.. _toolkit_matplotlibvenn: + +Matplotlib-Venn +=============== + +`Matplotlib-Venn `_ provides a set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn diagrams. + +mplstereonet +=============== + +`mplstereonet `_ provides stereonets for plotting and analyzing orientation data in Matplotlib. + + +.. _hl_plotting: + +High-Level Plotting +******************* + +Several projects have started to provide a higher-level interface to +matplotlib. These are independent projects. + +.. _toolkit_seaborn: + +seaborn +======= + +`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. + +.. _toolkit_ggplot: + +ggplot +====== + +`ggplot `_ is a port of the R ggplot2 +to python based on matplotlib. + + +.. _toolkit_prettyplotlib: + +prettyplotlib +============= + +`prettyplotlib `_ is an extension +to matplotlib which changes many of the defaults to make plots some +consider more attractive. + + +iTerm2 terminal backend +======================= + +`matplotlib_iterm2 `_ is an +external matplotlib backend uses iTerm2 nightly build inline image display +feature. + +.. image:: /_static/matplotlib_iterm2_demo.png From b72e97a9f38f729a19c193bbf96a251f6002363d Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 16:58:38 +0100 Subject: [PATCH 03/32] Split documentation in axisartist and axes_grid1 --- doc/make.py | 2 +- .../api/anchored_artists_api.rst | 0 .../api/axes_divider_api.rst | 0 .../api/axes_grid_api.rst | 0 .../api/axes_size_api.rst | 0 .../{axes_grid => axes_grid1}/api/index.rst | 14 +------ .../api/inset_locator_api.rst | 0 .../{axes_grid => axes_grid1}/examples | 0 .../figures/axis_direction_demo_step01.py | 0 .../figures/axis_direction_demo_step02.py | 0 .../figures/axis_direction_demo_step03.py | 0 .../figures/axis_direction_demo_step04.py | 0 .../figures/demo_axis_direction.py | 0 .../figures/demo_colorbar_of_inset_axes.py | 0 .../demo_colorbar_with_axes_divider.py | 0 .../figures/demo_fixed_size_axes.py | 0 .../figures/demo_new_colorbar.py | 0 .../figures/demo_parasite_axes.py | 0 .../figures/demo_ticklabel_alignment.py | 0 .../figures/demo_ticklabel_direction.py | 0 .../figures/parasite_simple.py | 0 .../figures/simple_axes_divider1.py | 0 .../figures/simple_axes_divider2.py | 0 .../figures/simple_axes_divider3.py | 0 .../figures/simple_axis_direction01.py | 0 .../figures/simple_axis_direction03.py | 0 .../figures/simple_axis_pad.py | 0 .../figures/simple_axisartist1.py | 0 .../figures/simple_axisline.py | 0 .../figures/simple_axisline2.py | 0 .../figures/simple_axisline3.py | 0 .../figures/simple_colorbar.py | 0 .../figures/simple_rgb.py | 0 .../{axes_grid => axes_grid1}/index.rst | 2 +- .../users/axes_divider.rst | 15 ++++--- .../users/axisartist.rst | 22 +++++----- .../{axes_grid => axes_grid1}/users/index.rst | 0 .../users/overview.rst | 40 +++++++++---------- .../api/axis_artist_api.rst | 0 doc/mpl_toolkits/axisartist/api/index.rst | 12 ++++++ doc/mpl_toolkits/axisartist/index.rst | 8 ++++ doc/mpl_toolkits/index.rst | 29 +++++++++----- 42 files changed, 79 insertions(+), 65 deletions(-) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/anchored_artists_api.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/axes_divider_api.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/axes_grid_api.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/axes_size_api.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/index.rst (57%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/api/inset_locator_api.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/examples (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/axis_direction_demo_step01.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/axis_direction_demo_step02.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/axis_direction_demo_step03.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/axis_direction_demo_step04.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_axis_direction.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_colorbar_of_inset_axes.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_colorbar_with_axes_divider.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_fixed_size_axes.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_new_colorbar.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_parasite_axes.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_ticklabel_alignment.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/demo_ticklabel_direction.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/parasite_simple.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axes_divider1.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axes_divider2.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axes_divider3.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axis_direction01.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axis_direction03.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axis_pad.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axisartist1.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axisline.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axisline2.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_axisline3.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_colorbar.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/figures/simple_rgb.py (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/index.rst (97%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/users/axes_divider.rst (85%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/users/axisartist.rst (95%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/users/index.rst (100%) rename doc/mpl_toolkits/{axes_grid => axes_grid1}/users/overview.rst (92%) rename doc/mpl_toolkits/{axes_grid => axisartist}/api/axis_artist_api.rst (100%) create mode 100644 doc/mpl_toolkits/axisartist/api/index.rst create mode 100644 doc/mpl_toolkits/axisartist/index.rst diff --git a/doc/make.py b/doc/make.py index 783e159be23c..f61a4fa035a4 100755 --- a/doc/make.py +++ b/doc/make.py @@ -149,7 +149,7 @@ def all(): required_symlinks = [ ('mpl_examples', '../examples/'), - ('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/') + ('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid/') ] symlink_warnings = [] diff --git a/doc/mpl_toolkits/axes_grid/api/anchored_artists_api.rst b/doc/mpl_toolkits/axes_grid1/api/anchored_artists_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/anchored_artists_api.rst rename to doc/mpl_toolkits/axes_grid1/api/anchored_artists_api.rst diff --git a/doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst b/doc/mpl_toolkits/axes_grid1/api/axes_divider_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst rename to doc/mpl_toolkits/axes_grid1/api/axes_divider_api.rst diff --git a/doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst b/doc/mpl_toolkits/axes_grid1/api/axes_grid_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst rename to doc/mpl_toolkits/axes_grid1/api/axes_grid_api.rst diff --git a/doc/mpl_toolkits/axes_grid/api/axes_size_api.rst b/doc/mpl_toolkits/axes_grid1/api/axes_size_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/axes_size_api.rst rename to doc/mpl_toolkits/axes_grid1/api/axes_size_api.rst diff --git a/doc/mpl_toolkits/axes_grid/api/index.rst b/doc/mpl_toolkits/axes_grid1/api/index.rst similarity index 57% rename from doc/mpl_toolkits/axes_grid/api/index.rst rename to doc/mpl_toolkits/axes_grid1/api/index.rst index 53db4fb7f88f..8a83b03f708e 100644 --- a/doc/mpl_toolkits/axes_grid/api/index.rst +++ b/doc/mpl_toolkits/axes_grid1/api/index.rst @@ -1,16 +1,4 @@ -.. _axes_grid-api-index: - -####################################### - The Matplotlib AxesGrid Toolkit API -####################################### - -:Release: |version| -:Date: |today| - -.. toctree:: - - axis_artist_api.rst - +.. _axes_grid1-api-index: ####################################### The Matplotlib axes_grid1 Toolkit API diff --git a/doc/mpl_toolkits/axes_grid/api/inset_locator_api.rst b/doc/mpl_toolkits/axes_grid1/api/inset_locator_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/inset_locator_api.rst rename to doc/mpl_toolkits/axes_grid1/api/inset_locator_api.rst diff --git a/doc/mpl_toolkits/axes_grid/examples b/doc/mpl_toolkits/axes_grid1/examples similarity index 100% rename from doc/mpl_toolkits/axes_grid/examples rename to doc/mpl_toolkits/axes_grid1/examples diff --git a/doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py b/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py rename to doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py diff --git a/doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py b/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py rename to doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py diff --git a/doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py b/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py rename to doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py diff --git a/doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py b/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py rename to doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_axis_direction.py b/doc/mpl_toolkits/axes_grid1/figures/demo_axis_direction.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_axis_direction.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_axis_direction.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_of_inset_axes.py b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_colorbar_of_inset_axes.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_colorbar_with_axes_divider.py b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_colorbar_with_axes_divider.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_fixed_size_axes.py b/doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_fixed_size_axes.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_new_colorbar.py b/doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_new_colorbar.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_parasite_axes.py b/doc/mpl_toolkits/axes_grid1/figures/demo_parasite_axes.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_parasite_axes.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_parasite_axes.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py b/doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py diff --git a/doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_direction.py b/doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_direction.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/demo_ticklabel_direction.py rename to doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_direction.py diff --git a/doc/mpl_toolkits/axes_grid/figures/parasite_simple.py b/doc/mpl_toolkits/axes_grid1/figures/parasite_simple.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/parasite_simple.py rename to doc/mpl_toolkits/axes_grid1/figures/parasite_simple.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider1.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axes_divider1.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axis_pad.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axis_pad.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axis_pad.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axis_pad.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisartist1.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axisartist1.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axisartist1.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axisartist1.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisline.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axisline.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axisline.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axisline.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisline2.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axisline2.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axisline2.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axisline2.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_axisline3.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axisline3.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_axisline3.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_axisline3.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_colorbar.py b/doc/mpl_toolkits/axes_grid1/figures/simple_colorbar.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_colorbar.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_colorbar.py diff --git a/doc/mpl_toolkits/axes_grid/figures/simple_rgb.py b/doc/mpl_toolkits/axes_grid1/figures/simple_rgb.py similarity index 100% rename from doc/mpl_toolkits/axes_grid/figures/simple_rgb.py rename to doc/mpl_toolkits/axes_grid1/figures/simple_rgb.py diff --git a/doc/mpl_toolkits/axes_grid/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst similarity index 97% rename from doc/mpl_toolkits/axes_grid/index.rst rename to doc/mpl_toolkits/axes_grid1/index.rst index 90f223c8436a..188b017aac66 100644 --- a/doc/mpl_toolkits/axes_grid/index.rst +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -1,5 +1,5 @@ -.. _toolkit_axesgrid-index: +.. _toolkit_axesgrid1-index: Matplotlib AxesGrid Toolkit =========================== diff --git a/doc/mpl_toolkits/axes_grid/users/axes_divider.rst b/doc/mpl_toolkits/axes_grid1/users/axes_divider.rst similarity index 85% rename from doc/mpl_toolkits/axes_grid/users/axes_divider.rst rename to doc/mpl_toolkits/axes_grid1/users/axes_divider.rst index fe0b782306c5..830cee84ef73 100644 --- a/doc/mpl_toolkits/axes_grid/users/axes_divider.rst +++ b/doc/mpl_toolkits/axes_grid1/users/axes_divider.rst @@ -4,11 +4,11 @@ AxesDivider The axes_divider module provide helper classes to adjust the axes positions of set of images in the drawing time. -* :mod:`~mpl_toolkits.axes_grid.axes_size` provides a classes of +* :mod:`~mpl_toolkits.axes_grid1.axes_size` provides a classes of units that the size of each axes will be determined. For example, you can specify a fixed size -* :class:`~mpl_toolkits.axes_grid.axes_size.Divider` this is the class +* :class:`~mpl_toolkits.axes_grid1.axes_size.Divider` this is the class that is used calculates the axes position. It divides the given rectangular area into several areas. You initialize the divider by setting the horizontal and vertical list of sizes that the division @@ -29,7 +29,7 @@ for example,:: where, rect is a bounds of the box that will be divided and h0,..h3, v0,..v2 need to be an instance of classes in the -:mod:`~mpl_toolkits.axes_grid.axes_size`. They have *get_size* method +:mod:`~mpl_toolkits.axes_grid1.axes_size`. They have *get_size* method that returns a tuple of two floats. The first float is the relative size, and the second float is the absolute size. Consider a following grid. @@ -56,11 +56,11 @@ determined. When aspect ratio is set, the total height (or width) will be adjusted accordingly. -The :mod:`mpl_toolkits.axes_grid.axes_size` contains several classes +The :mod:`mpl_toolkits.axes_grid1.axes_size` contains several classes that can be used to set the horizontal and vertical configurations. For example, for the vertical configuration above will be:: - from mpl_toolkits.axes_grid.axes_size import Fixed, Scaled + from mpl_toolkits.axes_grid1.axes_size import Fixed, Scaled vert = [Fixed(2), Scaled(2), Scaled(3)] After you set up the divider object, then you create a locator @@ -82,12 +82,11 @@ may consider it as [0:2, 1]. See the example, -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider2.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py :include-source: You can adjust the size of the each axes according to their x or y data limits (AxesX and AxesY), similar to the axes aspect parameter. -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider3.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py :include-source: - diff --git a/doc/mpl_toolkits/axes_grid/users/axisartist.rst b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst similarity index 95% rename from doc/mpl_toolkits/axes_grid/users/axisartist.rst rename to doc/mpl_toolkits/axes_grid1/users/axisartist.rst index 67cdf64ecfa1..d5bc671d4ca3 100644 --- a/doc/mpl_toolkits/axes_grid/users/axisartist.rst +++ b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst @@ -29,7 +29,7 @@ In summary, all these changes was to support * a curvilinear grid. * a floating axis -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py *mpl_toolkits.axisartist.Axes* class defines a *axis* attribute, which @@ -195,7 +195,7 @@ using "set_axis_direction" method. :: ax1.axis["left"].major_ticklabels.set_axis_direction("top") ax1.axis["right"].label.set_axis_direction("left") -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction01.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py The parameter for set_axis_direction is one of ["left", "right", "bottom", "top"]. @@ -206,7 +206,7 @@ You must understand some underlying concept of directions. of the axis line with increasing coordinate. For example, the reference direction of the left x-axis is from bottom to top. - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py + .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py The direction, text angle, and alignments of the ticks, ticklabels and axis-label is determined with respect to the reference direction @@ -214,11 +214,11 @@ You must understand some underlying concept of directions. 2. *ticklabel_direction* is either the right-hand side (+) of the reference direction or the left-hand side (-). - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py + .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py 3. same for the *label_direction* - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py + .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py 4. ticks are by default drawn toward the opposite direction of the ticklabels. @@ -226,7 +226,7 @@ You must understand some underlying concept of directions. to the *ticklabel_direction* or *label_direction*, respectively. The rotation of ticklabels and label is anchored. - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py + .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py On the other hand, there is a concept of "axis_direction". This is a @@ -251,7 +251,7 @@ And, 'set_axis_direction("top")' means to adjust the text rotation etc, for settings suitable for "top" axis. The concept of axis direction can be more clear with curved axis. -.. plot:: mpl_toolkits/axes_grid/figures/demo_axis_direction.py +.. plot:: mpl_toolkits/axes_grid1/figures/demo_axis_direction.py The axis_direction can be adjusted in the AxisArtist level, or in the level of its child arists, i.e., ticks, ticklabels, and axis-label. :: @@ -281,7 +281,7 @@ default direction). :: ax.axis[:].major_ticks.set_tick_out(True) -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction03.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py So, in summary, @@ -310,7 +310,7 @@ Adjusting ticklabels alignment Alignment of TickLabels are treated specially. See below -.. plot:: mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py +.. plot:: mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py Adjusting pad -------------- @@ -324,7 +324,7 @@ Or ticklabels and axis-label :: ax.axis["left"].label.set_pad(10) -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_pad.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_pad.py GridHelper @@ -418,7 +418,7 @@ coordinates, or you may use Parasite Axes for convenience.:: ax1.parasites.append(ax2) -.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py diff --git a/doc/mpl_toolkits/axes_grid/users/index.rst b/doc/mpl_toolkits/axes_grid1/users/index.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/users/index.rst rename to doc/mpl_toolkits/axes_grid1/users/index.rst diff --git a/doc/mpl_toolkits/axes_grid/users/overview.rst b/doc/mpl_toolkits/axes_grid1/users/overview.rst similarity index 92% rename from doc/mpl_toolkits/axes_grid/users/overview.rst rename to doc/mpl_toolkits/axes_grid1/users/overview.rst index 8a04b92ea55b..2f22e804eff2 100644 --- a/doc/mpl_toolkits/axes_grid/users/overview.rst +++ b/doc/mpl_toolkits/axes_grid1/users/overview.rst @@ -36,7 +36,7 @@ to draw ticks, ticklines and etc., Axes in axisartist uses special artist (AxisArtist) which can handle tick, ticklines and etc. for curved coordinate systems. -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py Since it uses a special artists, some mpl commands that work on Axes.xaxis and Axes.yaxis may not work. See LINK for more detail. @@ -56,7 +56,7 @@ data (e.g., different y-scale) in a same Axes. `AnchoredArtists`_ includes custom artists which are placed at some anchored position, like the legend. -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py AXES_GRID1 @@ -73,7 +73,7 @@ ratio. For example, displaying images of a same size with some fixed padding between them cannot be easily done in matplotlib. ImageGrid is used in such case. -.. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid.py +.. plot:: mpl_toolkits/axes_grid1/examples/simple_axesgrid.py :include-source: * The position of each axes is determined at the drawing time (see @@ -87,7 +87,7 @@ used in such case. height. The widths (height) of the axes in the same row (column) are scaled according to their view limits (xlim or ylim). - .. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid2.py + .. plot:: mpl_toolkits/axes_grid1/examples/simple_axesgrid2.py :include-source: * xaxis are shared among axes in a same column. Similarly, yaxis are @@ -175,7 +175,7 @@ attribute. The examples below show what you can do with AxesGrid. -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py AxesDivider @@ -206,7 +206,7 @@ creates a new axes on the given side of ("top", "right", "bottom" and colorbar whose height (or width) in sync with the master axes ------------------------------------------------------------- -.. plot:: mpl_toolkits/axes_grid/figures/simple_colorbar.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_colorbar.py :include-source: @@ -236,7 +236,7 @@ The "scatter_hist.py" example in mpl can be rewritten using See the full source code below. -.. plot:: mpl_toolkits/axes_grid/examples/scatter_hist.py +.. plot:: mpl_toolkits/axes_grid1/examples/scatter_hist.py The scatter_hist using the AxesDivider has some advantage over the @@ -271,7 +271,7 @@ parasite axes. To create a host axes, you may use *host_suplot* or Example 1. twinx ~~~~~~~~~~~~~~~~ -.. plot:: mpl_toolkits/axes_grid/figures/parasite_simple.py +.. plot:: mpl_toolkits/axes_grid1/figures/parasite_simple.py :include-source: Example 2. twin @@ -288,7 +288,7 @@ tick-formatter for bottom(or left)-axis. :: r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"]) -.. plot:: mpl_toolkits/axes_grid/examples/simple_axisline4.py +.. plot:: mpl_toolkits/axes_grid1/examples/simple_axisline4.py @@ -297,7 +297,7 @@ x-limit in the host axes, the x-limit of the parasite axes will change accordingly. -.. plot:: mpl_toolkits/axes_grid/examples/parasite_simple2.py +.. plot:: mpl_toolkits/axes_grid1/examples/parasite_simple2.py AnchoredArtists @@ -310,7 +310,7 @@ limited support for an arbitrary transform. For example, the ellipse in the example below will have width and height in the data coordinate. -.. plot:: mpl_toolkits/axes_grid/examples/simple_anchored_artists.py +.. plot:: mpl_toolkits/axes_grid1/examples/simple_anchored_artists.py :include-source: @@ -344,7 +344,7 @@ some factor. For example, :: creates an inset axes whose data scale is half of the parent axes. Here is complete examples. -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo.py +.. plot:: mpl_toolkits/axes_grid1/examples/inset_locator_demo.py For example, :func:`zoomed_inset_axes` can be used when you want the inset represents the zoom-up of the small portion in the parent axes. @@ -352,7 +352,7 @@ And :mod:`~mpl_toolkits/axes_grid/inset_locator` provides a helper function :func:`mark_inset` to mark the location of the area represented by the inset axes. -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo2.py +.. plot:: mpl_toolkits/axes_grid1/examples/inset_locator_demo2.py :include-source: @@ -374,7 +374,7 @@ yaxis of each axes are shared. :: origin="lower", interpolation="nearest") -.. plot:: mpl_toolkits/axes_grid/figures/simple_rgb.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_rgb.py AXISARTIST @@ -418,7 +418,7 @@ For example, you can hide the right, and top axis by :: ax.axis["top"].set_visible(False) -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisline3.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py It is also possible to add an extra axis. For example, you may have an @@ -426,7 +426,7 @@ horizontal axis at y=0 (in data coordinate). :: ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisartist1.py +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py :include-source: @@ -454,7 +454,7 @@ to create a host subplot with axisartist.Axes, :: Here is an example that uses parasiteAxes. -.. plot:: mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py @@ -464,7 +464,7 @@ Curvilinear Grid The motivation behind the AxisArtist module is to support curvilinear grid and ticks. -.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py +.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py See :ref:`axisartist-manual` for more details. @@ -475,6 +475,4 @@ Floating Axes This also support a Floating Axes whose outer axis are defined as floating axis. -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axes.py - - +.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py diff --git a/doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst b/doc/mpl_toolkits/axisartist/api/axis_artist_api.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst rename to doc/mpl_toolkits/axisartist/api/axis_artist_api.rst diff --git a/doc/mpl_toolkits/axisartist/api/index.rst b/doc/mpl_toolkits/axisartist/api/index.rst new file mode 100644 index 000000000000..8084ed83cbee --- /dev/null +++ b/doc/mpl_toolkits/axisartist/api/index.rst @@ -0,0 +1,12 @@ +.. _axisartist-api-index: + +####################################### + The Matplotlib Axisartist Toolkit API +####################################### + +:Release: |version| +:Date: |today| + +.. toctree:: + + axis_artist_api.rst diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst new file mode 100644 index 000000000000..0502200b8f87 --- /dev/null +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -0,0 +1,8 @@ +.. _toolkit_axisartist-index: + +Matplotlib Axisartist Toolkit +============================= + +.. toctree:: + + api/index.rst diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 924a8ad65b93..92c7ede01172 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -3,7 +3,7 @@ .. toctree:: :hidden: - axes_grid/index.rst + axes_grid1/index.rst mplot3d/index.rst .. _toolkits: @@ -17,10 +17,6 @@ Toolkits Toolkits are collections of application-specific functions that extend matplotlib. - -General Toolkits -**************** - .. _toolkit_mplot3d: mplot3d @@ -38,17 +34,17 @@ solution for some use cases. .. plot:: mpl_examples/mplot3d/contourf3d_demo2.py -.. _toolkit_axes_grid: +.. _toolkit_axes_grid1: -AxesGrid -======== +AxesGrid1 +========= .. toctree:: :maxdepth: 2 - axes_grid/index + axes_grid1/index -The matplotlib :ref:`AxesGrid ` toolkit is a collection of helper classes to +The matplotlib :ref:`AxesGrid ` toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. The AxesGrid toolkit is distributed with matplotlib source. @@ -57,6 +53,19 @@ distributed with matplotlib source. .. image:: /_static/demo_axes_grid.png +.. _toolkit_axisartist: + +Axisartist +========== +.. toctree:: + :maxdepth: 2 + + axisartist/index + + + + + .. _toolkit_gtk: GTK Tools From 786c389be5fe1d1e001b395eb0ab4c0580d68ede Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 17:29:28 +0100 Subject: [PATCH 04/32] Move axisartist userguide to axisartist --- doc/mpl_toolkits/axes_grid1/users/index.rst | 5 +- .../axes_grid1/users/overview.rst | 138 +----------------- doc/mpl_toolkits/axisartist/index.rst | 2 + .../axisartist/users/overview.rst | 121 +++++++++++++++ doc/mpl_toolkits/index.rst | 5 +- 5 files changed, 135 insertions(+), 136 deletions(-) create mode 100644 doc/mpl_toolkits/axisartist/users/overview.rst diff --git a/doc/mpl_toolkits/axes_grid1/users/index.rst b/doc/mpl_toolkits/axes_grid1/users/index.rst index 9ae9dbdd74bb..157821ad5e21 100644 --- a/doc/mpl_toolkits/axes_grid1/users/index.rst +++ b/doc/mpl_toolkits/axes_grid1/users/index.rst @@ -1,7 +1,7 @@ -.. _axes_grid_users-guide-index: +.. _axes_grid1_users-guide-index: ################################################ - The Matplotlib AxesGrid Toolkit User's Guide + The Matplotlib AxesGrid1 Toolkit User's Guide ################################################ :Release: |version| @@ -11,4 +11,3 @@ axes_divider.rst axisartist.rst - diff --git a/doc/mpl_toolkits/axes_grid1/users/overview.rst b/doc/mpl_toolkits/axes_grid1/users/overview.rst index 2f22e804eff2..7b007caa9963 100644 --- a/doc/mpl_toolkits/axes_grid1/users/overview.rst +++ b/doc/mpl_toolkits/axes_grid1/users/overview.rst @@ -1,11 +1,11 @@ -============================ -Overview of AxesGrid toolkit -============================ +============================= +Overview of AxesGrid1 toolkit +============================= -What is AxesGrid toolkit? -========================= +What is AxesGrid1 toolkit? +========================== -The matplotlib AxesGrid toolkit is a collection of helper classes, +The matplotlib AxesGrid1 toolkit is a collection of helper classes, mainly to ease displaying (multiple) images in matplotlib. .. contents:: @@ -15,32 +15,11 @@ mainly to ease displaying (multiple) images in matplotlib. .. note:: AxesGrid toolkit has been a part of matplotlib since v 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit + *axes_grid*. In more recent version, the toolkit has divided into two separate namespace (*axes_grid1* and *axisartist*). While *axes_grid* namespace is maintained for the backward compatibility, use of *axes_grid1* and *axisartist* is recommended. -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - - -AxesGrid toolkit has two namespaces (*axes_grid1* and *axisartist*). -*axisartist* contains custom Axes class that is meant to support for -curvilinear grids (e.g., the world coordinate system in astronomy). -Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis -to draw ticks, ticklines and etc., Axes in axisartist uses special -artist (AxisArtist) which can handle tick, ticklines and etc. for -curved coordinate systems. - -.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py - -Since it uses a special artists, some mpl commands that work on -Axes.xaxis and Axes.yaxis may not work. See LINK for more detail. - *axes_grid1* is a collection of helper classes to ease displaying (multiple) images with matplotlib. In matplotlib, the axes location @@ -59,7 +38,7 @@ like the legend. .. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py -AXES_GRID1 +Axes_grid1 ========== ImageGrid @@ -375,104 +354,3 @@ yaxis of each axes are shared. :: .. plot:: mpl_toolkits/axes_grid1/figures/simple_rgb.py - - -AXISARTIST -========== - - -AxisArtist ----------- - -AxisArtist module provides a custom (and very experimental) Axes -class, where each axis (left, right, top and bottom) have a separate -artist associated which is responsible to draw axis-line, ticks, -ticklabels, label. Also, you can create your own axis, which can pass -through a fixed position in the axes coordinate, or a fixed position -in the data coordinate (i.e., the axis floats around when viewlimit -changes). - -The axes class, by default, have its xaxis and yaxis invisible, and -has 4 additional artists which are responsible to draw axis in -"left","right","bottom" and "top". They are accessed as -ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a -dictionary that contains artists (note that ax.axis is still a -callable methods and it behaves as an original Axes.axis method in -mpl). - -To create an axes, :: - - import mpl_toolkits.axisartist as AA - fig = plt.figure(1) - ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8]) - fig.add_axes(ax) - -or to create a subplot :: - - ax = AA.Subplot(fig, 111) - fig.add_subplot(ax) - -For example, you can hide the right, and top axis by :: - - ax.axis["right"].set_visible(False) - ax.axis["top"].set_visible(False) - - -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py - - -It is also possible to add an extra axis. For example, you may have an -horizontal axis at y=0 (in data coordinate). :: - - ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) - -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py - :include-source: - - -Or a fixed axis with some offset :: - - # make new (right-side) yaxis, but wth some offset - ax.axis["right2"] = ax.new_fixed_axis(loc="right", - offset=(20, 0)) - - - -AxisArtist with ParasiteAxes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Most commands in the axes_grid1 toolkit can take a axes_class keyword -argument, and the commands creates an axes of the given class. For example, -to create a host subplot with axisartist.Axes, :: - - import mpl_tookits.axisartist as AA - from mpl_toolkits.axes_grid1 import host_subplot - - host = host_subplot(111, axes_class=AA.Axes) - - -Here is an example that uses parasiteAxes. - - -.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py - - - -Curvilinear Grid ----------------- - -The motivation behind the AxisArtist module is to support curvilinear grid -and ticks. - -.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py - -See :ref:`axisartist-manual` for more details. - - -Floating Axes -------------- - -This also support a Floating Axes whose outer axis are defined as -floating axis. - -.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst index 0502200b8f87..4c3157751bc0 100644 --- a/doc/mpl_toolkits/axisartist/index.rst +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -4,5 +4,7 @@ Matplotlib Axisartist Toolkit ============================= .. toctree:: + :maxdepth: 2 + users/overview.rst api/index.rst diff --git a/doc/mpl_toolkits/axisartist/users/overview.rst b/doc/mpl_toolkits/axisartist/users/overview.rst new file mode 100644 index 000000000000..af254db453a0 --- /dev/null +++ b/doc/mpl_toolkits/axisartist/users/overview.rst @@ -0,0 +1,121 @@ +============================== +Overview of AxisArtist toolkit +============================== + +.. warning:: + *axisartist* uses a custom Axes class + (derived from the mpl's original Axes class). + As a side effect, some commands (mostly tick-related) do not work. + + +*axisartist* contains custom Axes class that is meant to support for +curvilinear grids (e.g., the world coordinate system in astronomy). +Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis +to draw ticks, ticklines and etc., Axes in axisartist uses special +artist (AxisArtist) which can handle tick, ticklines and etc. for +curved coordinate systems. + +.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py + +Since it uses a special artists, some mpl commands that work on +Axes.xaxis and Axes.yaxis may not work. + +AXISARTIST +========== + + +AxisArtist +---------- + +AxisArtist module provides a custom (and very experimental) Axes +class, where each axis (left, right, top and bottom) have a separate +artist associated which is responsible to draw axis-line, ticks, +ticklabels, label. Also, you can create your own axis, which can pass +through a fixed position in the axes coordinate, or a fixed position +in the data coordinate (i.e., the axis floats around when viewlimit +changes). + +The axes class, by default, have its xaxis and yaxis invisible, and +has 4 additional artists which are responsible to draw axis in +"left","right","bottom" and "top". They are accessed as +ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a +dictionary that contains artists (note that ax.axis is still a +callable methods and it behaves as an original Axes.axis method in +mpl). + +To create an axes, :: + + import mpl_toolkits.axisartist as AA + fig = plt.figure(1) + ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8]) + fig.add_axes(ax) + +or to create a subplot :: + + ax = AA.Subplot(fig, 111) + fig.add_subplot(ax) + +For example, you can hide the right, and top axis by :: + + ax.axis["right"].set_visible(False) + ax.axis["top"].set_visible(False) + + +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py + + +It is also possible to add an extra axis. For example, you may have an +horizontal axis at y=0 (in data coordinate). :: + + ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) + +.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py + :include-source: + + +Or a fixed axis with some offset :: + + # make new (right-side) yaxis, but wth some offset + ax.axis["right2"] = ax.new_fixed_axis(loc="right", + offset=(20, 0)) + + + +AxisArtist with ParasiteAxes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Most commands in the axes_grid1 toolkit can take a axes_class keyword +argument, and the commands creates an axes of the given class. For example, +to create a host subplot with axisartist.Axes, :: + + import mpl_tookits.axisartist as AA + from mpl_toolkits.axes_grid1 import host_subplot + + host = host_subplot(111, axes_class=AA.Axes) + + +Here is an example that uses parasiteAxes. + + +.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py + + + +Curvilinear Grid +---------------- + +The motivation behind the AxisArtist module is to support curvilinear grid +and ticks. + +.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py + +See :ref:`axisartist-manual` for more details. + + +Floating Axes +------------- + +This also support a Floating Axes whose outer axis are defined as +floating axis. + +.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 92c7ede01172..e724e360e2d1 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -44,9 +44,8 @@ AxesGrid1 axes_grid1/index -The matplotlib :ref:`AxesGrid ` toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. The AxesGrid toolkit is -distributed with matplotlib source. +The matplotlib :ref:`AxesGrid1 ` toolkit is a +collection of helper classes to ease displaying multiple images in matplotlib. From e9a9cc8764b760765208454f7dd6fea7d8c87612 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 18:18:15 +0100 Subject: [PATCH 05/32] Remove warning --- doc/mpl_toolkits/axes_grid1/index.rst | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/doc/mpl_toolkits/axes_grid1/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst index 188b017aac66..eb1bc465bf9c 100644 --- a/doc/mpl_toolkits/axes_grid1/index.rst +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -1,13 +1,13 @@ .. _toolkit_axesgrid1-index: -Matplotlib AxesGrid Toolkit -=========================== +Matplotlib AxesGrid1 Toolkit +============================ -The matplotlib AxesGrid toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. While the aspect -parameter in matplotlib adjust the position of the single axes, -AxesGrid toolkit provides a framework to adjust the position of +The matplotlib :class:`mpl_toolkits.axes_grid1` toolkit is a collection of +helper classes to ease displaying multiple images in matplotlib. While the +aspect parameter in matplotlib adjust the position of the single axes, +AxesGrid1 toolkit provides a framework to adjust the position of multiple axes according to their aspects. @@ -21,13 +21,6 @@ multiple axes according to their aspects. While *axes_grid* namespace is maintained for the backward compatibility, use of *axes_grid1* and *axisartist* is recommended. -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - .. toctree:: :maxdepth: 2 From a8ae5aa2c148ff4b5daada723f3634edfd70bbf1 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 18:34:49 +0100 Subject: [PATCH 06/32] Split axes_grid1 and axisartist examples --- examples/{axes_grid => axes_grid1}/demo_axes_divider.py | 0 examples/{axes_grid => axes_grid1}/demo_axes_grid.py | 0 examples/{axes_grid => axes_grid1}/demo_axes_grid2.py | 0 .../{axes_grid => axes_grid1}/demo_axes_hbox_divider.py | 0 examples/{axes_grid => axes_grid1}/demo_axes_rgb.py | 0 .../demo_colorbar_with_inset_locator.py | 0 examples/{axes_grid => axes_grid1}/demo_edge_colorbar.py | 0 examples/{axes_grid => axes_grid1}/demo_imagegrid_aspect.py | 0 examples/{axes_grid => axes_grid1}/inset_locator_demo.py | 0 examples/{axes_grid => axes_grid1}/inset_locator_demo2.py | 0 .../make_room_for_ylabel_using_axesgrid.py | 0 examples/{axes_grid => axes_grid1}/parasite_simple2.py | 0 examples/{axes_grid => axes_grid1}/scatter_hist.py | 0 .../{axes_grid => axes_grid1}/simple_anchored_artists.py | 0 examples/{axes_grid => axes_grid1}/simple_axesgrid.py | 0 examples/{axes_grid => axes_grid1}/simple_axesgrid2.py | 0 examples/{axes_grid => axisartist}/demo_axisline_style.py | 2 +- examples/{axes_grid => axisartist}/demo_curvelinear_grid.py | 0 .../{axes_grid => axisartist}/demo_curvelinear_grid2.py | 6 +++--- examples/{axes_grid => axisartist}/demo_floating_axes.py | 0 examples/{axes_grid => axisartist}/demo_floating_axis.py | 0 examples/{axes_grid => axisartist}/demo_parasite_axes2.py | 0 examples/{axes_grid => axisartist}/simple_axisline4.py | 0 23 files changed, 4 insertions(+), 4 deletions(-) rename examples/{axes_grid => axes_grid1}/demo_axes_divider.py (100%) rename examples/{axes_grid => axes_grid1}/demo_axes_grid.py (100%) rename examples/{axes_grid => axes_grid1}/demo_axes_grid2.py (100%) rename examples/{axes_grid => axes_grid1}/demo_axes_hbox_divider.py (100%) rename examples/{axes_grid => axes_grid1}/demo_axes_rgb.py (100%) rename examples/{axes_grid => axes_grid1}/demo_colorbar_with_inset_locator.py (100%) rename examples/{axes_grid => axes_grid1}/demo_edge_colorbar.py (100%) rename examples/{axes_grid => axes_grid1}/demo_imagegrid_aspect.py (100%) rename examples/{axes_grid => axes_grid1}/inset_locator_demo.py (100%) rename examples/{axes_grid => axes_grid1}/inset_locator_demo2.py (100%) rename examples/{axes_grid => axes_grid1}/make_room_for_ylabel_using_axesgrid.py (100%) rename examples/{axes_grid => axes_grid1}/parasite_simple2.py (100%) rename examples/{axes_grid => axes_grid1}/scatter_hist.py (100%) rename examples/{axes_grid => axes_grid1}/simple_anchored_artists.py (100%) rename examples/{axes_grid => axes_grid1}/simple_axesgrid.py (100%) rename examples/{axes_grid => axes_grid1}/simple_axesgrid2.py (100%) rename examples/{axes_grid => axisartist}/demo_axisline_style.py (88%) rename examples/{axes_grid => axisartist}/demo_curvelinear_grid.py (100%) rename examples/{axes_grid => axisartist}/demo_curvelinear_grid2.py (90%) rename examples/{axes_grid => axisartist}/demo_floating_axes.py (100%) rename examples/{axes_grid => axisartist}/demo_floating_axis.py (100%) rename examples/{axes_grid => axisartist}/demo_parasite_axes2.py (100%) rename examples/{axes_grid => axisartist}/simple_axisline4.py (100%) diff --git a/examples/axes_grid/demo_axes_divider.py b/examples/axes_grid1/demo_axes_divider.py similarity index 100% rename from examples/axes_grid/demo_axes_divider.py rename to examples/axes_grid1/demo_axes_divider.py diff --git a/examples/axes_grid/demo_axes_grid.py b/examples/axes_grid1/demo_axes_grid.py similarity index 100% rename from examples/axes_grid/demo_axes_grid.py rename to examples/axes_grid1/demo_axes_grid.py diff --git a/examples/axes_grid/demo_axes_grid2.py b/examples/axes_grid1/demo_axes_grid2.py similarity index 100% rename from examples/axes_grid/demo_axes_grid2.py rename to examples/axes_grid1/demo_axes_grid2.py diff --git a/examples/axes_grid/demo_axes_hbox_divider.py b/examples/axes_grid1/demo_axes_hbox_divider.py similarity index 100% rename from examples/axes_grid/demo_axes_hbox_divider.py rename to examples/axes_grid1/demo_axes_hbox_divider.py diff --git a/examples/axes_grid/demo_axes_rgb.py b/examples/axes_grid1/demo_axes_rgb.py similarity index 100% rename from examples/axes_grid/demo_axes_rgb.py rename to examples/axes_grid1/demo_axes_rgb.py diff --git a/examples/axes_grid/demo_colorbar_with_inset_locator.py b/examples/axes_grid1/demo_colorbar_with_inset_locator.py similarity index 100% rename from examples/axes_grid/demo_colorbar_with_inset_locator.py rename to examples/axes_grid1/demo_colorbar_with_inset_locator.py diff --git a/examples/axes_grid/demo_edge_colorbar.py b/examples/axes_grid1/demo_edge_colorbar.py similarity index 100% rename from examples/axes_grid/demo_edge_colorbar.py rename to examples/axes_grid1/demo_edge_colorbar.py diff --git a/examples/axes_grid/demo_imagegrid_aspect.py b/examples/axes_grid1/demo_imagegrid_aspect.py similarity index 100% rename from examples/axes_grid/demo_imagegrid_aspect.py rename to examples/axes_grid1/demo_imagegrid_aspect.py diff --git a/examples/axes_grid/inset_locator_demo.py b/examples/axes_grid1/inset_locator_demo.py similarity index 100% rename from examples/axes_grid/inset_locator_demo.py rename to examples/axes_grid1/inset_locator_demo.py diff --git a/examples/axes_grid/inset_locator_demo2.py b/examples/axes_grid1/inset_locator_demo2.py similarity index 100% rename from examples/axes_grid/inset_locator_demo2.py rename to examples/axes_grid1/inset_locator_demo2.py diff --git a/examples/axes_grid/make_room_for_ylabel_using_axesgrid.py b/examples/axes_grid1/make_room_for_ylabel_using_axesgrid.py similarity index 100% rename from examples/axes_grid/make_room_for_ylabel_using_axesgrid.py rename to examples/axes_grid1/make_room_for_ylabel_using_axesgrid.py diff --git a/examples/axes_grid/parasite_simple2.py b/examples/axes_grid1/parasite_simple2.py similarity index 100% rename from examples/axes_grid/parasite_simple2.py rename to examples/axes_grid1/parasite_simple2.py diff --git a/examples/axes_grid/scatter_hist.py b/examples/axes_grid1/scatter_hist.py similarity index 100% rename from examples/axes_grid/scatter_hist.py rename to examples/axes_grid1/scatter_hist.py diff --git a/examples/axes_grid/simple_anchored_artists.py b/examples/axes_grid1/simple_anchored_artists.py similarity index 100% rename from examples/axes_grid/simple_anchored_artists.py rename to examples/axes_grid1/simple_anchored_artists.py diff --git a/examples/axes_grid/simple_axesgrid.py b/examples/axes_grid1/simple_axesgrid.py similarity index 100% rename from examples/axes_grid/simple_axesgrid.py rename to examples/axes_grid1/simple_axesgrid.py diff --git a/examples/axes_grid/simple_axesgrid2.py b/examples/axes_grid1/simple_axesgrid2.py similarity index 100% rename from examples/axes_grid/simple_axesgrid2.py rename to examples/axes_grid1/simple_axesgrid2.py diff --git a/examples/axes_grid/demo_axisline_style.py b/examples/axisartist/demo_axisline_style.py similarity index 88% rename from examples/axes_grid/demo_axisline_style.py rename to examples/axisartist/demo_axisline_style.py index 3d0b0d6f5dab..a8e2c7ada5d7 100644 --- a/examples/axes_grid/demo_axisline_style.py +++ b/examples/axisartist/demo_axisline_style.py @@ -1,5 +1,5 @@ -from mpl_toolkits.axes_grid.axislines import SubplotZero +from mpl_toolkits.axisartist.axislines import SubplotZero import matplotlib.pyplot as plt import numpy as np diff --git a/examples/axes_grid/demo_curvelinear_grid.py b/examples/axisartist/demo_curvelinear_grid.py similarity index 100% rename from examples/axes_grid/demo_curvelinear_grid.py rename to examples/axisartist/demo_curvelinear_grid.py diff --git a/examples/axes_grid/demo_curvelinear_grid2.py b/examples/axisartist/demo_curvelinear_grid2.py similarity index 90% rename from examples/axes_grid/demo_curvelinear_grid2.py rename to examples/axisartist/demo_curvelinear_grid2.py index a1b105cefdf3..8d8e30a893db 100644 --- a/examples/axes_grid/demo_curvelinear_grid2.py +++ b/examples/axisartist/demo_curvelinear_grid2.py @@ -1,11 +1,11 @@ import numpy as np import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.grid_helper_curvelinear import \ +from mpl_toolkits.axisartist.grid_helper_curvelinear import \ GridHelperCurveLinear -from mpl_toolkits.axes_grid.axislines import Subplot +from mpl_toolkits.axisartist.axislines import Subplot -import mpl_toolkits.axes_grid.angle_helper as angle_helper +import mpl_toolkits.axisartist.angle_helper as angle_helper def curvelinear_test1(fig): diff --git a/examples/axes_grid/demo_floating_axes.py b/examples/axisartist/demo_floating_axes.py similarity index 100% rename from examples/axes_grid/demo_floating_axes.py rename to examples/axisartist/demo_floating_axes.py diff --git a/examples/axes_grid/demo_floating_axis.py b/examples/axisartist/demo_floating_axis.py similarity index 100% rename from examples/axes_grid/demo_floating_axis.py rename to examples/axisartist/demo_floating_axis.py diff --git a/examples/axes_grid/demo_parasite_axes2.py b/examples/axisartist/demo_parasite_axes2.py similarity index 100% rename from examples/axes_grid/demo_parasite_axes2.py rename to examples/axisartist/demo_parasite_axes2.py diff --git a/examples/axes_grid/simple_axisline4.py b/examples/axisartist/simple_axisline4.py similarity index 100% rename from examples/axes_grid/simple_axisline4.py rename to examples/axisartist/simple_axisline4.py From 60a8b7fc4163c0fa1a4f88b337f3785745c5c048 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 19:08:04 +0100 Subject: [PATCH 07/32] Correct links to examples --- doc/make.py | 3 ++- doc/mpl_toolkits/axes_grid1/examples | 2 +- doc/mpl_toolkits/axes_grid1/users/axisartist.rst | 4 ++-- doc/mpl_toolkits/axes_grid1/users/overview.rst | 2 +- doc/mpl_toolkits/axisartist/examples | 1 + doc/mpl_toolkits/axisartist/users/overview.rst | 8 ++++---- 6 files changed, 11 insertions(+), 9 deletions(-) create mode 120000 doc/mpl_toolkits/axisartist/examples diff --git a/doc/make.py b/doc/make.py index f61a4fa035a4..78366dea3dca 100755 --- a/doc/make.py +++ b/doc/make.py @@ -149,7 +149,8 @@ def all(): required_symlinks = [ ('mpl_examples', '../examples/'), - ('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid/') + ('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid1/'), + ('mpl_toolkits/axisartist/examples', '../../../examples/axisartist/') ] symlink_warnings = [] diff --git a/doc/mpl_toolkits/axes_grid1/examples b/doc/mpl_toolkits/axes_grid1/examples index 69ba136bcc62..4a4be2d52c98 120000 --- a/doc/mpl_toolkits/axes_grid1/examples +++ b/doc/mpl_toolkits/axes_grid1/examples @@ -1 +1 @@ -../../../examples/axes_grid/ \ No newline at end of file +../../../examples/axes_grid1/ \ No newline at end of file diff --git a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst index d5bc671d4ca3..d8491328772c 100644 --- a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst +++ b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst @@ -29,7 +29,7 @@ In summary, all these changes was to support * a curvilinear grid. * a floating axis -.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py +.. plot:: mpl_toolkits/axisartist/examples/demo_floating_axis.py *mpl_toolkits.axisartist.Axes* class defines a *axis* attribute, which @@ -418,7 +418,7 @@ coordinates, or you may use Parasite Axes for convenience.:: ax1.parasites.append(ax2) -.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py +.. plot:: mpl_toolkits/axisartist/examples/demo_curvelinear_grid.py diff --git a/doc/mpl_toolkits/axes_grid1/users/overview.rst b/doc/mpl_toolkits/axes_grid1/users/overview.rst index 7b007caa9963..42b74bd2d5f0 100644 --- a/doc/mpl_toolkits/axes_grid1/users/overview.rst +++ b/doc/mpl_toolkits/axes_grid1/users/overview.rst @@ -267,7 +267,7 @@ tick-formatter for bottom(or left)-axis. :: r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"]) -.. plot:: mpl_toolkits/axes_grid1/examples/simple_axisline4.py +.. plot:: mpl_toolkits/axisartist/examples/simple_axisline4.py diff --git a/doc/mpl_toolkits/axisartist/examples b/doc/mpl_toolkits/axisartist/examples new file mode 120000 index 000000000000..bd4a984623a0 --- /dev/null +++ b/doc/mpl_toolkits/axisartist/examples @@ -0,0 +1 @@ +../../../examples/axisartist/ \ No newline at end of file diff --git a/doc/mpl_toolkits/axisartist/users/overview.rst b/doc/mpl_toolkits/axisartist/users/overview.rst index af254db453a0..26fd44c168a3 100644 --- a/doc/mpl_toolkits/axisartist/users/overview.rst +++ b/doc/mpl_toolkits/axisartist/users/overview.rst @@ -15,7 +15,7 @@ to draw ticks, ticklines and etc., Axes in axisartist uses special artist (AxisArtist) which can handle tick, ticklines and etc. for curved coordinate systems. -.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axis.py +.. plot:: mpl_toolkits/axisartist/examples/demo_floating_axis.py Since it uses a special artists, some mpl commands that work on Axes.xaxis and Axes.yaxis may not work. @@ -97,7 +97,7 @@ to create a host subplot with axisartist.Axes, :: Here is an example that uses parasiteAxes. -.. plot:: mpl_toolkits/axes_grid1/examples/demo_parasite_axes2.py +.. plot:: mpl_toolkits/axisartist/examples/demo_parasite_axes2.py @@ -107,7 +107,7 @@ Curvilinear Grid The motivation behind the AxisArtist module is to support curvilinear grid and ticks. -.. plot:: mpl_toolkits/axes_grid1/examples/demo_curvelinear_grid.py +.. plot:: mpl_toolkits/axisartist/examples/demo_curvelinear_grid.py See :ref:`axisartist-manual` for more details. @@ -118,4 +118,4 @@ Floating Axes This also support a Floating Axes whose outer axis are defined as floating axis. -.. plot:: mpl_toolkits/axes_grid1/examples/demo_floating_axes.py +.. plot:: mpl_toolkits/axisartist/examples/demo_floating_axes.py From 535eb24877e2bab11189a41b7d2067e091d277f7 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 19:23:01 +0100 Subject: [PATCH 08/32] Correct links in whatsnew --- doc/mpl_toolkits/axisartist/index.rst | 1 + doc/mpl_toolkits/axisartist/users/index.rst | 8 ++++++++ doc/users/whats_new.rst | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 doc/mpl_toolkits/axisartist/users/index.rst diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst index 4c3157751bc0..7737514b28bb 100644 --- a/doc/mpl_toolkits/axisartist/index.rst +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -7,4 +7,5 @@ Matplotlib Axisartist Toolkit :maxdepth: 2 users/overview.rst + users/index.rst api/index.rst diff --git a/doc/mpl_toolkits/axisartist/users/index.rst b/doc/mpl_toolkits/axisartist/users/index.rst new file mode 100644 index 000000000000..4affcfff12fd --- /dev/null +++ b/doc/mpl_toolkits/axisartist/users/index.rst @@ -0,0 +1,8 @@ +.. _axisartist_users-guide-index: + +################################################ + The Matplotlib Axisartist Toolkit User's Guide +################################################ + +:Release: |version| +:Date: |today| diff --git a/doc/users/whats_new.rst b/doc/users/whats_new.rst index c1657092b6ce..ab6ab4f39b71 100644 --- a/doc/users/whats_new.rst +++ b/doc/users/whats_new.rst @@ -2111,8 +2111,9 @@ axes grid toolkit Jae-Joon Lee has added a new toolkit to ease displaying multiple images in matplotlib, as well as some support for curvilinear grids to support the world coordinate system. The toolkit is included standard with all -new mpl installs. See :ref:`axes_grid-examples-index` and -:ref:`axes_grid_users-guide-index`. +new mpl installs. See :ref:`axes_grid1-examples-index`, +:ref:`axisartist-examples-index`, :ref:`axes_grid1_users-guide-index` and +:ref:`axisartist_users-guide-index` .. plot:: pyplots/whats_new_99_axes_grid.py From d49bbce436c6d33fa1f79aad4d793add86bc3553 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 21:15:24 +0100 Subject: [PATCH 09/32] Correct links to gallery --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 84221b2bce32..bc1eb0123cbc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -135,7 +135,8 @@ ('api', 'API'), ('pylab_examples', 'pylab examples'), ('mplot3d', 'mplot3d toolkit'), - ('axes_grid', 'axes_grid toolkit'), + ('axes_grid1', 'axes_grid1 toolkit'), + ('axisartist', 'axisartist toolkit'), ('units', 'units'), ('widgets', 'widgets'), ) From 047ccb2f50bab9ec746b244fd956c6f474e3d0d5 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 21:46:03 +0100 Subject: [PATCH 10/32] Split figures in axisartist and axisgrid1 --- .../axes_grid1/figures/demo_colorbar_of_inset_axes.py | 5 ++--- .../axes_grid1/figures/demo_colorbar_with_axes_divider.py | 5 ++--- doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py | 3 +-- doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py | 3 +-- doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py | 2 +- doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py | 2 +- doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py | 4 ++-- .../figures/axis_direction_demo_step01.py | 0 .../figures/axis_direction_demo_step02.py | 0 .../figures/axis_direction_demo_step03.py | 0 .../figures/axis_direction_demo_step04.py | 0 .../figures/demo_axis_direction.py | 0 .../{axes_grid1 => axisartist}/figures/demo_parasite_axes.py | 0 .../figures/demo_ticklabel_alignment.py | 0 .../figures/demo_ticklabel_direction.py | 2 +- .../figures/simple_axis_direction01.py | 0 .../figures/simple_axis_direction03.py | 0 .../{axes_grid1 => axisartist}/figures/simple_axis_pad.py | 0 .../{axes_grid1 => axisartist}/figures/simple_axisartist1.py | 0 .../{axes_grid1 => axisartist}/figures/simple_axisline.py | 3 +-- .../{axes_grid1 => axisartist}/figures/simple_axisline2.py | 3 +-- .../{axes_grid1 => axisartist}/figures/simple_axisline3.py | 3 +-- 22 files changed, 14 insertions(+), 21 deletions(-) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/axis_direction_demo_step01.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/axis_direction_demo_step02.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/axis_direction_demo_step03.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/axis_direction_demo_step04.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/demo_axis_direction.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/demo_parasite_axes.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/demo_ticklabel_alignment.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/demo_ticklabel_direction.py (95%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axis_direction01.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axis_direction03.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axis_pad.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axisartist1.py (100%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axisline.py (94%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axisline2.py (90%) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/figures/simple_axisline3.py (77%) diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py index e4e708c6685a..326fefef6323 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py +++ b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_of_inset_axes.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.inset_locator import inset_axes, zoomed_inset_axes -from mpl_toolkits.axes_grid.colorbar import colorbar +from mpl_toolkits.axes_grid1.inset_locator import inset_axes, zoomed_inset_axes +from mpl_toolkits.axes_grid1.colorbar import colorbar def get_demo_image(): from matplotlib.cbook import get_sample_data @@ -46,4 +46,3 @@ def get_demo_image(): plt.draw() plt.show() - diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py index 3816f013fbdf..e73f0c95c93f 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py +++ b/doc/mpl_toolkits/axes_grid1/figures/demo_colorbar_with_axes_divider.py @@ -1,7 +1,7 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axes_divider import make_axes_locatable +from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable -from mpl_toolkits.axes_grid.colorbar import colorbar +from mpl_toolkits.axes_grid1.colorbar import colorbar # from matplotlib.pyplot import colorbar fig = plt.figure(1, figsize=(6, 3)) @@ -22,4 +22,3 @@ cb2 = colorbar(im2, cax=cax2, orientation="horizontal") cax2.xaxis.set_ticks_position("top") plt.show() - diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py b/doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py index 9c2b651e571c..7c235b477ccc 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py +++ b/doc/mpl_toolkits/axes_grid1/figures/demo_fixed_size_axes.py @@ -1,7 +1,6 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid \ - import Divider, LocatableAxes, Size +from mpl_toolkits.axes_grid1 import Divider, LocatableAxes, Size def demo_fixed_size_axes(): diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py b/doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py index 88a722ee2241..de5d3e0de0c4 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py +++ b/doc/mpl_toolkits/axes_grid1/figures/demo_new_colorbar.py @@ -10,7 +10,7 @@ cb1.ax.set_yticks([1, 3]) ax1.set_title("Original MPL's colorbar w/\nset_yticks([1,3])", size=10) -from mpl_toolkits.axes_grid.colorbar import colorbar +from mpl_toolkits.axes_grid1.colorbar import colorbar ax2 = fig.add_subplot(122) im2 = ax2.imshow([[1,2],[3,4]]) cb2 = colorbar(im2) @@ -18,4 +18,3 @@ ax2.set_title("AxesGrid's colorbar w/\nset_yticks([1,3])", size=10) plt.show() - diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py index 7141fe88ce13..7fc92964f945 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py +++ b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py @@ -1,4 +1,4 @@ -from mpl_toolkits.axes_grid import Size, Divider +from mpl_toolkits.axes_grid1 import Size, Divider import matplotlib.pyplot as plt diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py index 7b866c3c0581..781e6b6caa2e 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py +++ b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py @@ -1,4 +1,4 @@ -import mpl_toolkits.axes_grid.axes_size as Size +import mpl_toolkits.axes_grid1.axes_size as Size from mpl_toolkits.axes_grid import Divider import matplotlib.pyplot as plt diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py index 203bdd5068eb..408fa5247b63 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py +++ b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider3.py @@ -1,5 +1,5 @@ -import mpl_toolkits.axes_grid.axes_size as Size -from mpl_toolkits.axes_grid import Divider +import mpl_toolkits.axes_grid1.axes_size as Size +from mpl_toolkits.axes_grid1 import Divider import matplotlib.pyplot as plt diff --git a/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py b/doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step01.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py rename to doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step01.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py b/doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step02.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py rename to doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step02.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py b/doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step03.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py rename to doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step03.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py b/doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step04.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py rename to doc/mpl_toolkits/axisartist/figures/axis_direction_demo_step04.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_axis_direction.py b/doc/mpl_toolkits/axisartist/figures/demo_axis_direction.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/demo_axis_direction.py rename to doc/mpl_toolkits/axisartist/figures/demo_axis_direction.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_parasite_axes.py b/doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/demo_parasite_axes.py rename to doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py b/doc/mpl_toolkits/axisartist/figures/demo_ticklabel_alignment.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py rename to doc/mpl_toolkits/axisartist/figures/demo_ticklabel_alignment.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_direction.py b/doc/mpl_toolkits/axisartist/figures/demo_ticklabel_direction.py similarity index 95% rename from doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_direction.py rename to doc/mpl_toolkits/axisartist/figures/demo_ticklabel_direction.py index cd205991363a..a52d353494d4 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/demo_ticklabel_direction.py +++ b/doc/mpl_toolkits/axisartist/figures/demo_ticklabel_direction.py @@ -1,6 +1,6 @@ import matplotlib.pyplot as plt -import mpl_toolkits.axes_grid.axislines as axislines +import mpl_toolkits.axisartist.axislines as axislines def setup_axes(fig, rect): diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py b/doc/mpl_toolkits/axisartist/figures/simple_axis_direction01.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py rename to doc/mpl_toolkits/axisartist/figures/simple_axis_direction01.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py b/doc/mpl_toolkits/axisartist/figures/simple_axis_direction03.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py rename to doc/mpl_toolkits/axisartist/figures/simple_axis_direction03.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axis_pad.py b/doc/mpl_toolkits/axisartist/figures/simple_axis_pad.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axis_pad.py rename to doc/mpl_toolkits/axisartist/figures/simple_axis_pad.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axisartist1.py b/doc/mpl_toolkits/axisartist/figures/simple_axisartist1.py similarity index 100% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axisartist1.py rename to doc/mpl_toolkits/axisartist/figures/simple_axisartist1.py diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline.py b/doc/mpl_toolkits/axisartist/figures/simple_axisline.py similarity index 94% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axisline.py rename to doc/mpl_toolkits/axisartist/figures/simple_axisline.py index ef74cb4ebfdc..6c0d585c8ee3 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline.py +++ b/doc/mpl_toolkits/axisartist/figures/simple_axisline.py @@ -1,6 +1,6 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import SubplotZero +from mpl_toolkits.axisartist.axislines import SubplotZero if 1: @@ -36,4 +36,3 @@ ax.plot([-2,3,2]) plt.draw() plt.show() - diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline2.py b/doc/mpl_toolkits/axisartist/figures/simple_axisline2.py similarity index 90% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axisline2.py rename to doc/mpl_toolkits/axisartist/figures/simple_axisline2.py index 5440aec168a1..488fd95bb518 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline2.py +++ b/doc/mpl_toolkits/axisartist/figures/simple_axisline2.py @@ -1,5 +1,5 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import SubplotZero +from mpl_toolkits.axisartist.axislines import SubplotZero import numpy as np fig = plt.figure(1, (4,3)) @@ -21,4 +21,3 @@ ax.plot(xx, np.sin(xx)) plt.show() - diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline3.py b/doc/mpl_toolkits/axisartist/figures/simple_axisline3.py similarity index 77% rename from doc/mpl_toolkits/axes_grid1/figures/simple_axisline3.py rename to doc/mpl_toolkits/axisartist/figures/simple_axisline3.py index 68d42677cd54..8256b5669ee4 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axisline3.py +++ b/doc/mpl_toolkits/axisartist/figures/simple_axisline3.py @@ -1,5 +1,5 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import Subplot +from mpl_toolkits.axisartist.axislines import Subplot fig = plt.figure(1, (3,3)) @@ -10,4 +10,3 @@ ax.axis["top"].set_visible(False) plt.show() - From b1798b6a23be2c161332bd6809874d68280eec16 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 22:08:50 +0100 Subject: [PATCH 11/32] Correct links to figures --- .../axes_grid1/users/axisartist.rst | 18 +++++++++--------- doc/mpl_toolkits/axisartist/users/overview.rst | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst index d8491328772c..ade6f5c874ea 100644 --- a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst +++ b/doc/mpl_toolkits/axes_grid1/users/axisartist.rst @@ -195,7 +195,7 @@ using "set_axis_direction" method. :: ax1.axis["left"].major_ticklabels.set_axis_direction("top") ax1.axis["right"].label.set_axis_direction("left") -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction01.py +.. plot:: mpl_toolkits/axisartist/figures/simple_axis_direction01.py The parameter for set_axis_direction is one of ["left", "right", "bottom", "top"]. @@ -206,7 +206,7 @@ You must understand some underlying concept of directions. of the axis line with increasing coordinate. For example, the reference direction of the left x-axis is from bottom to top. - .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step01.py + .. plot:: mpl_toolkits/axisartist/figures/axis_direction_demo_step01.py The direction, text angle, and alignments of the ticks, ticklabels and axis-label is determined with respect to the reference direction @@ -214,11 +214,11 @@ You must understand some underlying concept of directions. 2. *ticklabel_direction* is either the right-hand side (+) of the reference direction or the left-hand side (-). - .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step02.py + .. plot:: mpl_toolkits/axisartist/figures/axis_direction_demo_step02.py 3. same for the *label_direction* - .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step03.py + .. plot:: mpl_toolkits/axisartist/figures/axis_direction_demo_step03.py 4. ticks are by default drawn toward the opposite direction of the ticklabels. @@ -226,7 +226,7 @@ You must understand some underlying concept of directions. to the *ticklabel_direction* or *label_direction*, respectively. The rotation of ticklabels and label is anchored. - .. plot:: mpl_toolkits/axes_grid1/figures/axis_direction_demo_step04.py + .. plot:: mpl_toolkits/axisartist/figures/axis_direction_demo_step04.py On the other hand, there is a concept of "axis_direction". This is a @@ -251,7 +251,7 @@ And, 'set_axis_direction("top")' means to adjust the text rotation etc, for settings suitable for "top" axis. The concept of axis direction can be more clear with curved axis. -.. plot:: mpl_toolkits/axes_grid1/figures/demo_axis_direction.py +.. plot:: mpl_toolkits/axisartist/figures/demo_axis_direction.py The axis_direction can be adjusted in the AxisArtist level, or in the level of its child arists, i.e., ticks, ticklabels, and axis-label. :: @@ -281,7 +281,7 @@ default direction). :: ax.axis[:].major_ticks.set_tick_out(True) -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_direction03.py +.. plot:: mpl_toolkits/axisartist/figures/simple_axis_direction03.py So, in summary, @@ -310,7 +310,7 @@ Adjusting ticklabels alignment Alignment of TickLabels are treated specially. See below -.. plot:: mpl_toolkits/axes_grid1/figures/demo_ticklabel_alignment.py +.. plot:: mpl_toolkits/axisartist/figures/demo_ticklabel_alignment.py Adjusting pad -------------- @@ -324,7 +324,7 @@ Or ticklabels and axis-label :: ax.axis["left"].label.set_pad(10) -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axis_pad.py +.. plot:: mpl_toolkits/axisartist/figures/simple_axis_pad.py GridHelper diff --git a/doc/mpl_toolkits/axisartist/users/overview.rst b/doc/mpl_toolkits/axisartist/users/overview.rst index 26fd44c168a3..e3d4c783803d 100644 --- a/doc/mpl_toolkits/axisartist/users/overview.rst +++ b/doc/mpl_toolkits/axisartist/users/overview.rst @@ -61,7 +61,7 @@ For example, you can hide the right, and top axis by :: ax.axis["top"].set_visible(False) -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisline3.py +.. plot:: mpl_toolkits/axisartist/figures/simple_axisline3.py It is also possible to add an extra axis. For example, you may have an @@ -69,7 +69,7 @@ horizontal axis at y=0 (in data coordinate). :: ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) -.. plot:: mpl_toolkits/axes_grid1/figures/simple_axisartist1.py +.. plot:: mpl_toolkits/axisartist/figures/simple_axisartist1.py :include-source: From 138a6c13da0d2f850ec4162d7d5dcf701ed98221 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 22:25:09 +0100 Subject: [PATCH 12/32] Move axisartist docs --- doc/mpl_toolkits/axes_grid1/users/index.rst | 1 - .../users/axisartist.rst | 22 +++++++++---------- doc/mpl_toolkits/axisartist/users/index.rst | 4 ++++ 3 files changed, 15 insertions(+), 12 deletions(-) rename doc/mpl_toolkits/{axes_grid1 => axisartist}/users/axisartist.rst (99%) diff --git a/doc/mpl_toolkits/axes_grid1/users/index.rst b/doc/mpl_toolkits/axes_grid1/users/index.rst index 157821ad5e21..6edbb0f98049 100644 --- a/doc/mpl_toolkits/axes_grid1/users/index.rst +++ b/doc/mpl_toolkits/axes_grid1/users/index.rst @@ -10,4 +10,3 @@ .. toctree:: axes_divider.rst - axisartist.rst diff --git a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst b/doc/mpl_toolkits/axisartist/users/axisartist.rst similarity index 99% rename from doc/mpl_toolkits/axes_grid1/users/axisartist.rst rename to doc/mpl_toolkits/axisartist/users/axisartist.rst index ade6f5c874ea..ae080f52509f 100644 --- a/doc/mpl_toolkits/axes_grid1/users/axisartist.rst +++ b/doc/mpl_toolkits/axisartist/users/axisartist.rst @@ -117,15 +117,15 @@ ticklabels, and label. To make ticklabel invisible, :: ax.axis["bottom"].toggle(ticklabels=False) To make all of ticks, ticklabels, and (axis) label invisible :: - + ax.axis["bottom"].toggle(all=False) - + To turn all off but ticks on :: - + ax.axis["bottom"].toggle(all=False, ticks=True) - + To turn all on but (axis) label off :: - + ax.axis["bottom"].toggle(all=True, label=False)) @@ -140,7 +140,7 @@ Note that 'ax.axis["top","right"]' returns a simple proxy object that translate ax.axis[n].toggle(ticklabels=True)) So, any return values in the for loop are ignored. And you should not -use it anything more than a simple method. +use it anything more than a simple method. Like the list indexing ":" means all items, i.e., :: @@ -231,7 +231,7 @@ You must understand some underlying concept of directions. On the other hand, there is a concept of "axis_direction". This is a default setting of above properties for each, "bottom", "left", "top", -and "right" axis. +and "right" axis. ========== =========== ========= ========== ========= ========== ? ? left bottom right top @@ -245,7 +245,7 @@ and "right" axis. ticklabel ha right center right center ticklabel va center baseline center baseline ========== =========== ========= ========== ========= ========== - + And, 'set_axis_direction("top")' means to adjust the text rotation etc, for settings suitable for "top" axis. The concept of axis @@ -270,11 +270,11 @@ axis_direction of ticks, ticklabels, and axis-label does not affect them. -If you want to make ticks outward and ticklabels inside the axes, +If you want to make ticks outward and ticklabels inside the axes, use invert_ticklabel_direction method. :: ax.axis[:].invert_ticklabel_direction() - + A related method is "set_tick_out". It makes ticks outward (as a matter of fact, it makes ticks toward the opposite direction of the default direction). :: @@ -284,7 +284,7 @@ default direction). :: .. plot:: mpl_toolkits/axisartist/figures/simple_axis_direction03.py -So, in summary, +So, in summary, * AxisArtist's methods * set_axis_direction : "left", "right", "bottom", or "top" diff --git a/doc/mpl_toolkits/axisartist/users/index.rst b/doc/mpl_toolkits/axisartist/users/index.rst index 4affcfff12fd..d2b6924d86a3 100644 --- a/doc/mpl_toolkits/axisartist/users/index.rst +++ b/doc/mpl_toolkits/axisartist/users/index.rst @@ -6,3 +6,7 @@ :Release: |version| :Date: |today| + +.. toctree:: + + axisartist.rst From ef84b93c7767501e75b72de0e4cc7f758ff886fc Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Sat, 26 Dec 2015 22:34:10 +0100 Subject: [PATCH 13/32] Move overview docs up one level --- doc/mpl_toolkits/axes_grid1/index.rst | 2 +- doc/mpl_toolkits/axes_grid1/{users => }/overview.rst | 0 doc/mpl_toolkits/axisartist/index.rst | 2 +- doc/mpl_toolkits/axisartist/{users => }/overview.rst | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename doc/mpl_toolkits/axes_grid1/{users => }/overview.rst (100%) rename doc/mpl_toolkits/axisartist/{users => }/overview.rst (100%) diff --git a/doc/mpl_toolkits/axes_grid1/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst index eb1bc465bf9c..6a5e84317f62 100644 --- a/doc/mpl_toolkits/axes_grid1/index.rst +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -24,6 +24,6 @@ multiple axes according to their aspects. .. toctree:: :maxdepth: 2 - users/overview.rst + overview.rst users/index.rst api/index.rst diff --git a/doc/mpl_toolkits/axes_grid1/users/overview.rst b/doc/mpl_toolkits/axes_grid1/overview.rst similarity index 100% rename from doc/mpl_toolkits/axes_grid1/users/overview.rst rename to doc/mpl_toolkits/axes_grid1/overview.rst diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst index 7737514b28bb..a2ab1630ab26 100644 --- a/doc/mpl_toolkits/axisartist/index.rst +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -6,6 +6,6 @@ Matplotlib Axisartist Toolkit .. toctree:: :maxdepth: 2 - users/overview.rst + overview.rst users/index.rst api/index.rst diff --git a/doc/mpl_toolkits/axisartist/users/overview.rst b/doc/mpl_toolkits/axisartist/overview.rst similarity index 100% rename from doc/mpl_toolkits/axisartist/users/overview.rst rename to doc/mpl_toolkits/axisartist/overview.rst From b41caa4dfa80881abf03af2ffef766a36be1f7a0 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Mon, 28 Dec 2015 12:56:18 +0100 Subject: [PATCH 14/32] Clarify index --- doc/mpl_toolkits/index.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index e724e360e2d1..e858cd84190c 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -4,6 +4,7 @@ :hidden: axes_grid1/index.rst + axisartist/index.rst mplot3d/index.rst .. _toolkits: @@ -36,16 +37,16 @@ solution for some use cases. .. _toolkit_axes_grid1: -AxesGrid1 -========= +axes_grid1 +========== .. toctree:: :maxdepth: 2 axes_grid1/index -The matplotlib :ref:`AxesGrid1 ` toolkit is a -collection of helper classes to ease displaying multiple images in matplotlib. +The :ref:`mpl_toolkits.axisgrid1 ` toolkit is a +collection of helper classes to ease displaying multiple axes in matplotlib. @@ -54,7 +55,7 @@ collection of helper classes to ease displaying multiple images in matplotlib. .. _toolkit_axisartist: -Axisartist +axisartist ========== .. toctree:: :maxdepth: 2 @@ -62,7 +63,8 @@ Axisartist axisartist/index - +The :ref:`mpl_toolkits.axisartist ` toolkit contains +a custom Axes class that is meant to support for curvilinear grids. .. _toolkit_gtk: @@ -70,7 +72,7 @@ Axisartist GTK Tools ========= -mpl_toolkits.gtktools provides some utilities for working with GTK. +``mpl_toolkits.gtktools`` provides some utilities for working with GTK. This toolkit ships with matplotlib, but requires `pygtk `_. @@ -80,6 +82,6 @@ This toolkit ships with matplotlib, but requires `pygtk Excel Tools =========== -mpl_toolkits.exceltools provides some utilities for working with +``mpl_toolkits.exceltools`` provides some utilities for working with Excel. This toolkit ships with matplotlib, but requires `xlwt `_ From 44fb5ea5de9fea9b88ea0d64c55ea549bc6bca8c Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 11:59:52 +0100 Subject: [PATCH 15/32] Update axes_grid1 overview Remove all use of axisartist from overview of axes_grid1 --- doc/mpl_toolkits/axes_grid1/index.rst | 4 +- doc/mpl_toolkits/axes_grid1/overview.rst | 18 ++--- examples/axes_grid1/demo_axes_grid.py | 69 +++++++++---------- .../simple_axisline4.py | 2 +- 4 files changed, 46 insertions(+), 47 deletions(-) rename examples/{axisartist => axes_grid1}/simple_axisline4.py (92%) diff --git a/doc/mpl_toolkits/axes_grid1/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst index 6a5e84317f62..f861585679c1 100644 --- a/doc/mpl_toolkits/axes_grid1/index.rst +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -7,7 +7,7 @@ Matplotlib AxesGrid1 Toolkit The matplotlib :class:`mpl_toolkits.axes_grid1` toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. While the aspect parameter in matplotlib adjust the position of the single axes, -AxesGrid1 toolkit provides a framework to adjust the position of +axesgrid1 toolkit provides a framework to adjust the position of multiple axes according to their aspects. @@ -16,7 +16,7 @@ multiple axes according to their aspects. .. note:: AxesGrid toolkit has been a part of matplotlib since v 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit + *axes_grid*. In more recent version, the toolkit has divided into two separate namespace (*axes_grid1* and *axisartist*). While *axes_grid* namespace is maintained for the backward compatibility, use of *axes_grid1* and *axisartist* is recommended. diff --git a/doc/mpl_toolkits/axes_grid1/overview.rst b/doc/mpl_toolkits/axes_grid1/overview.rst index 42b74bd2d5f0..8b9ef21311f3 100644 --- a/doc/mpl_toolkits/axes_grid1/overview.rst +++ b/doc/mpl_toolkits/axes_grid1/overview.rst @@ -2,10 +2,10 @@ Overview of AxesGrid1 toolkit ============================= -What is AxesGrid1 toolkit? -========================== +What is axes_grid1 toolkit? +=========================== -The matplotlib AxesGrid1 toolkit is a collection of helper classes, +The matplotlib axes_grid1 toolkit is a collection of helper classes, mainly to ease displaying (multiple) images in matplotlib. .. contents:: @@ -38,7 +38,7 @@ like the legend. .. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py -Axes_grid1 +axes_grid1 ========== ImageGrid @@ -85,7 +85,7 @@ axes). -AxesGrid takes following arguments, +ImageGrid takes following arguments, ============= ======== ================================================ @@ -152,7 +152,7 @@ attribute. -The examples below show what you can do with AxesGrid. +The examples below show what you can do with ImageGrid. .. plot:: mpl_toolkits/axes_grid1/examples/demo_axes_grid.py @@ -267,7 +267,7 @@ tick-formatter for bottom(or left)-axis. :: r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"]) -.. plot:: mpl_toolkits/axisartist/examples/simple_axisline4.py +.. plot:: mpl_toolkits/axis_grid1/examples/simple_axisline4.py @@ -296,11 +296,11 @@ coordinate. InsetLocator ------------ -:mod:`mpl_toolkits.axes_grid.inset_locator` provides helper classes +:mod:`mpl_toolkits.axes_grid1.inset_locator` provides helper classes and functions to place your (inset) axes at the anchored position of the parent axes, similarly to AnchoredArtist. -Using :func:`mpl_toolkits.axes_grid.inset_locator.inset_axes`, you +Using :func:`mpl_toolkits.axes_grid1.inset_locator.inset_axes`, you can have inset axes whose size is either fixed, or a fixed proportion of the parent axes. For example,:: diff --git a/examples/axes_grid1/demo_axes_grid.py b/examples/axes_grid1/demo_axes_grid.py index 7d74cc5072e5..01f78edbf927 100644 --- a/examples/axes_grid1/demo_axes_grid.py +++ b/examples/axes_grid1/demo_axes_grid.py @@ -1,5 +1,5 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid1 import AxesGrid +from mpl_toolkits.axes_grid1 import ImageGrid def get_demo_image(): @@ -16,11 +16,11 @@ def demo_simple_grid(fig): A grid of 2x2 images with 0.05 inch pad between images and only the lower-left axes is labeled. """ - grid = AxesGrid(fig, 141, # similar to subplot(141) - nrows_ncols=(2, 2), - axes_pad=0.05, - label_mode="1", - ) + grid = ImageGrid(fig, 141, # similar to subplot(141) + nrows_ncols=(2, 2), + axes_pad=0.05, + label_mode="1", + ) Z, extent = get_demo_image() for i in range(4): @@ -36,19 +36,18 @@ def demo_grid_with_single_cbar(fig): """ A grid of 2x2 images with a single colorbar """ - grid = AxesGrid(fig, 142, # similar to subplot(142) - nrows_ncols=(2, 2), - axes_pad=0.0, - share_all=True, - label_mode="L", - cbar_location="top", - cbar_mode="single", - ) + grid = ImageGrid(fig, 142, # similar to subplot(142) + nrows_ncols=(2, 2), + axes_pad=0.0, + share_all=True, + label_mode="L", + cbar_location="top", + cbar_mode="single", + ) Z, extent = get_demo_image() for i in range(4): im = grid[i].imshow(Z, extent=extent, interpolation="nearest") - #plt.colorbar(im, cax = grid.cbar_axes[0]) grid.cbar_axes[0].colorbar(im) for cax in grid.cbar_axes: @@ -64,16 +63,16 @@ def demo_grid_with_each_cbar(fig): A grid of 2x2 images. Each image has its own colorbar. """ - grid = AxesGrid(fig, 143, # similar to subplot(143) - nrows_ncols=(2, 2), - axes_pad=0.1, - label_mode="1", - share_all=True, - cbar_location="top", - cbar_mode="each", - cbar_size="7%", - cbar_pad="2%", - ) + grid = ImageGrid(fig, 143, # similar to subplot(143) + nrows_ncols=(2, 2), + axes_pad=0.1, + label_mode="1", + share_all=True, + cbar_location="top", + cbar_mode="each", + cbar_size="7%", + cbar_pad="2%", + ) Z, extent = get_demo_image() for i in range(4): im = grid[i].imshow(Z, extent=extent, interpolation="nearest") @@ -92,16 +91,16 @@ def demo_grid_with_each_cbar_labelled(fig): A grid of 2x2 images. Each image has its own colorbar. """ - grid = AxesGrid(fig, 144, # similar to subplot(144) - nrows_ncols=(2, 2), - axes_pad=(0.45, 0.15), - label_mode="1", - share_all=True, - cbar_location="right", - cbar_mode="each", - cbar_size="7%", - cbar_pad="2%", - ) + grid = ImageGrid(fig, 144, # similar to subplot(144) + nrows_ncols=(2, 2), + axes_pad=(0.45, 0.15), + label_mode="1", + share_all=True, + cbar_location="right", + cbar_mode="each", + cbar_size="7%", + cbar_pad="2%", + ) Z, extent = get_demo_image() # Use a different colorbar range every time diff --git a/examples/axisartist/simple_axisline4.py b/examples/axes_grid1/simple_axisline4.py similarity index 92% rename from examples/axisartist/simple_axisline4.py rename to examples/axes_grid1/simple_axisline4.py index cac8fe0ccb94..b3bc3b4cd69a 100644 --- a/examples/axisartist/simple_axisline4.py +++ b/examples/axes_grid1/simple_axisline4.py @@ -3,7 +3,7 @@ import mpl_toolkits.axisartist as AA import numpy as np -ax = host_subplot(111, axes_class=AA.Axes) +ax = host_subplot(111) xx = np.arange(0, 2*np.pi, 0.01) ax.plot(xx, np.sin(xx)) From 9862d43ea00bb6bc811738fd8d35783df6dcc7cd Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 12:14:28 +0100 Subject: [PATCH 16/32] Update axes_grid1 some more --- .../axes_grid1/figures/simple_axes_divider1.py | 3 +-- .../axes_grid1/figures/simple_axes_divider2.py | 2 +- doc/mpl_toolkits/axes_grid1/index.rst | 4 ++-- doc/mpl_toolkits/axes_grid1/overview.rst | 8 ++++---- doc/mpl_toolkits/axes_grid1/users/index.rst | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py index 7fc92964f945..94149d082305 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py +++ b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider1.py @@ -6,7 +6,7 @@ # fixed size in inch horiz = [Size.Fixed(1.), Size.Fixed(.5), Size.Fixed(1.5), - Size.Fixed(.5)] + Size.Fixed(.5)] vert = [Size.Fixed(1.5), Size.Fixed(.5), Size.Fixed(1.)] rect = (0.1, 0.1, 0.8, 0.8) @@ -25,6 +25,5 @@ ax4.set_axes_locator(divider.new_locator(nx=2, nx1=4, ny=0)) - plt.draw() plt.show() diff --git a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py index 781e6b6caa2e..76198796c131 100644 --- a/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py +++ b/doc/mpl_toolkits/axes_grid1/figures/simple_axes_divider2.py @@ -1,5 +1,5 @@ import mpl_toolkits.axes_grid1.axes_size as Size -from mpl_toolkits.axes_grid import Divider +from mpl_toolkits.axes_grid1 import Divider import matplotlib.pyplot as plt fig1 = plt.figure(1, (5.5, 4.)) diff --git a/doc/mpl_toolkits/axes_grid1/index.rst b/doc/mpl_toolkits/axes_grid1/index.rst index f861585679c1..1f758d12bc36 100644 --- a/doc/mpl_toolkits/axes_grid1/index.rst +++ b/doc/mpl_toolkits/axes_grid1/index.rst @@ -1,8 +1,8 @@ .. _toolkit_axesgrid1-index: -Matplotlib AxesGrid1 Toolkit -============================ +Matplotlib axes_grid1 Toolkit +============================= The matplotlib :class:`mpl_toolkits.axes_grid1` toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. While the diff --git a/doc/mpl_toolkits/axes_grid1/overview.rst b/doc/mpl_toolkits/axes_grid1/overview.rst index 8b9ef21311f3..d86278e2896e 100644 --- a/doc/mpl_toolkits/axes_grid1/overview.rst +++ b/doc/mpl_toolkits/axes_grid1/overview.rst @@ -1,6 +1,6 @@ -============================= -Overview of AxesGrid1 toolkit -============================= +============================== +Overview of axes_grid1 toolkit +============================== What is axes_grid1 toolkit? =========================== @@ -267,7 +267,7 @@ tick-formatter for bottom(or left)-axis. :: r"$\pi$", r"$\frac{3}{2}\pi$", r"$2\pi$"]) -.. plot:: mpl_toolkits/axis_grid1/examples/simple_axisline4.py +.. plot:: mpl_toolkits/axes_grid1/examples/simple_axisline4.py diff --git a/doc/mpl_toolkits/axes_grid1/users/index.rst b/doc/mpl_toolkits/axes_grid1/users/index.rst index 6edbb0f98049..9251b9298a73 100644 --- a/doc/mpl_toolkits/axes_grid1/users/index.rst +++ b/doc/mpl_toolkits/axes_grid1/users/index.rst @@ -1,8 +1,8 @@ .. _axes_grid1_users-guide-index: -################################################ - The Matplotlib AxesGrid1 Toolkit User's Guide -################################################ +################################################# + The Matplotlib axes_grid1 Toolkit User's Guide +################################################# :Release: |version| :Date: |today| From a2d8009920f86d3f6aa9bb5262db1865c513edfb Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 12:30:06 +0100 Subject: [PATCH 17/32] update axisartist --- doc/mpl_toolkits/axisartist/index.rst | 2 +- doc/mpl_toolkits/axisartist/overview.rst | 14 +++++--------- doc/mpl_toolkits/axisartist/users/axisartist.rst | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/doc/mpl_toolkits/axisartist/index.rst b/doc/mpl_toolkits/axisartist/index.rst index a2ab1630ab26..22855f1f2cdd 100644 --- a/doc/mpl_toolkits/axisartist/index.rst +++ b/doc/mpl_toolkits/axisartist/index.rst @@ -1,6 +1,6 @@ .. _toolkit_axisartist-index: -Matplotlib Axisartist Toolkit +Matplotlib axisartist Toolkit ============================= .. toctree:: diff --git a/doc/mpl_toolkits/axisartist/overview.rst b/doc/mpl_toolkits/axisartist/overview.rst index e3d4c783803d..7252c5d96061 100644 --- a/doc/mpl_toolkits/axisartist/overview.rst +++ b/doc/mpl_toolkits/axisartist/overview.rst @@ -1,5 +1,5 @@ ============================== -Overview of AxisArtist toolkit +Overview of axisartist toolkit ============================== .. warning:: @@ -8,7 +8,7 @@ Overview of AxisArtist toolkit As a side effect, some commands (mostly tick-related) do not work. -*axisartist* contains custom Axes class that is meant to support for +The *axisartist* contains custom Axes class that is meant to support for curvilinear grids (e.g., the world coordinate system in astronomy). Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis to draw ticks, ticklines and etc., Axes in axisartist uses special @@ -20,14 +20,10 @@ curved coordinate systems. Since it uses a special artists, some mpl commands that work on Axes.xaxis and Axes.yaxis may not work. -AXISARTIST -========== - - -AxisArtist +axisartist ---------- -AxisArtist module provides a custom (and very experimental) Axes +*axisartist* module provides a custom (and very experimental) Axes class, where each axis (left, right, top and bottom) have a separate artist associated which is responsible to draw axis-line, ticks, ticklabels, label. Also, you can create your own axis, which can pass @@ -81,7 +77,7 @@ Or a fixed axis with some offset :: -AxisArtist with ParasiteAxes +axisartist with ParasiteAxes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most commands in the axes_grid1 toolkit can take a axes_class keyword diff --git a/doc/mpl_toolkits/axisartist/users/axisartist.rst b/doc/mpl_toolkits/axisartist/users/axisartist.rst index ae080f52509f..09c24055f598 100644 --- a/doc/mpl_toolkits/axisartist/users/axisartist.rst +++ b/doc/mpl_toolkits/axisartist/users/axisartist.rst @@ -1,10 +1,10 @@ .. _axisartist-manual: ==================== -AXISARTIST namespace +axisartist namespace ==================== -The AxisArtist namespace includes a derived Axes implementation. The +The *axisartist* namespace includes a derived Axes implementation. The biggest difference is that the artists responsible to draw axis line, ticks, ticklabel and axis labels are separated out from the mpl's Axis class, which are much more than artists in the original mpl. This From 69705a77dfb296525eeb6c8fd4ba6f0ad34598b8 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 13:02:46 +0100 Subject: [PATCH 18/32] Copy all remaing functionality from axes_grid to axisartist --- .../axisartist/figures/demo_parasite_axes.py | 2 +- lib/mpl_toolkits/axisartist/axes_divider.py | 10 ++++++ lib/mpl_toolkits/axisartist/axes_grid.py | 32 +++++++++++++++++++ lib/mpl_toolkits/axisartist/axes_rgb.py | 13 ++++++++ lib/mpl_toolkits/axisartist/parasite_axes.py | 20 ++++++++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 lib/mpl_toolkits/axisartist/axes_divider.py create mode 100644 lib/mpl_toolkits/axisartist/axes_grid.py create mode 100644 lib/mpl_toolkits/axisartist/axes_rgb.py create mode 100644 lib/mpl_toolkits/axisartist/parasite_axes.py diff --git a/doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py b/doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py index a42c9b6493fc..5e465b2b32a6 100644 --- a/doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py +++ b/doc/mpl_toolkits/axisartist/figures/demo_parasite_axes.py @@ -1,4 +1,4 @@ -from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes +from mpl_toolkits.axisartist.parasite_axes import HostAxes, ParasiteAxes import matplotlib.pyplot as plt if __name__ == "__main__": diff --git a/lib/mpl_toolkits/axisartist/axes_divider.py b/lib/mpl_toolkits/axisartist/axes_divider.py new file mode 100644 index 000000000000..9d05c639be93 --- /dev/null +++ b/lib/mpl_toolkits/axisartist/axes_divider.py @@ -0,0 +1,10 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +from matplotlib.externals import six + +from mpl_toolkits.axes_grid1.axes_divider import Divider, AxesLocator, SubplotDivider, \ + AxesDivider, locatable_axes_factory, make_axes_locatable + +from mpl_toolkits.axes_grid.axislines import Axes +LocatableAxes = locatable_axes_factory(Axes) diff --git a/lib/mpl_toolkits/axisartist/axes_grid.py b/lib/mpl_toolkits/axisartist/axes_grid.py new file mode 100644 index 000000000000..96bc7bb7ad1e --- /dev/null +++ b/lib/mpl_toolkits/axisartist/axes_grid.py @@ -0,0 +1,32 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +from matplotlib.externals import six + +import mpl_toolkits.axes_grid1.axes_grid as axes_grid_orig +from .axes_divider import LocatableAxes + +class CbarAxes(axes_grid_orig.CbarAxesBase, LocatableAxes): + def __init__(self, *kl, **kwargs): + orientation=kwargs.pop("orientation", None) + if orientation is None: + raise ValueError("orientation must be specified") + self.orientation = orientation + self._default_label_on = False + self.locator = None + + super(LocatableAxes, self).__init__(*kl, **kwargs) + + def cla(self): + super(LocatableAxes, self).cla() + self._config_axes() + + +class Grid(axes_grid_orig.Grid): + _defaultLocatableAxesClass = LocatableAxes + +class ImageGrid(axes_grid_orig.ImageGrid): + _defaultLocatableAxesClass = LocatableAxes + _defaultCbarAxesClass = CbarAxes + +AxesGrid = ImageGrid diff --git a/lib/mpl_toolkits/axisartist/axes_rgb.py b/lib/mpl_toolkits/axisartist/axes_rgb.py new file mode 100644 index 000000000000..d433928804b3 --- /dev/null +++ b/lib/mpl_toolkits/axisartist/axes_rgb.py @@ -0,0 +1,13 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +from matplotlib.externals import six + +#from mpl_toolkits.axes_grid1.axes_rgb import * +from mpl_toolkits.axes_grid1.axes_rgb import make_rgb_axes, imshow_rgb, RGBAxesBase + +#import mpl_toolkits.axes_grid1.axes_rgb as axes_rgb_orig +from .axislines import Axes + +class RGBAxes(RGBAxesBase): + _defaultAxesClass = Axes diff --git a/lib/mpl_toolkits/axisartist/parasite_axes.py b/lib/mpl_toolkits/axisartist/parasite_axes.py new file mode 100644 index 000000000000..7c77482e6853 --- /dev/null +++ b/lib/mpl_toolkits/axisartist/parasite_axes.py @@ -0,0 +1,20 @@ +from __future__ import (absolute_import, division, print_function, + unicode_literals) + +from matplotlib.externals import six + +from mpl_toolkits.axes_grid1.parasite_axes import \ + subplot_class_factory, \ + parasite_axes_class_factory, parasite_axes_auxtrans_class_factory, \ + host_axes_class_factory + +from .axislines import Axes + + +ParasiteAxes = parasite_axes_class_factory(Axes) + +ParasiteAxesAuxTrans = parasite_axes_auxtrans_class_factory(axes_class=ParasiteAxes) + +HostAxes = host_axes_class_factory(axes_class=Axes) + +SubplotHost = subplot_class_factory(HostAxes) From b17e5d68e12c40c61bf972a084aa137d839a57d3 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 13:11:06 +0100 Subject: [PATCH 19/32] Deprecate mpl_toolkits.axes_grid --- lib/mpl_toolkits/axes_grid/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/mpl_toolkits/axes_grid/__init__.py b/lib/mpl_toolkits/axes_grid/__init__.py index acdd625bf452..c202eb7e1718 100644 --- a/lib/mpl_toolkits/axes_grid/__init__.py +++ b/lib/mpl_toolkits/axes_grid/__init__.py @@ -8,3 +8,10 @@ make_axes_locatable from .axes_grid import Grid, ImageGrid, AxesGrid #from axes_divider import make_axes_locatable +from matplotlib.cbook import warn_deprecated +warn_deprecated(since='2.1', + name='mpl_toolkits.axes_grid', + alternative='mpl_toolkits.axes_grid1 and' + ' mpl_toolkits.axisartist provies the same' + ' functionality', + obj_type='module') From 74da787613539b7848b8d2ddfa43b1fd9a6fbfc4 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 13:39:59 +0100 Subject: [PATCH 20/32] Move third party packages to its own toplevel index --- doc/contents.rst | 1 + doc/resources/index.rst | 122 ----------------------------- doc/thirdpartypackages/index.rst | 128 +++++++++++++++++++++++++++++++ 3 files changed, 129 insertions(+), 122 deletions(-) create mode 100644 doc/thirdpartypackages/index.rst diff --git a/doc/contents.rst b/doc/contents.rst index 62612705ab2e..c7bacc2b6afc 100644 --- a/doc/contents.rst +++ b/doc/contents.rst @@ -18,6 +18,7 @@ Overview users/index.rst faq/index.rst resources/index.rst + thirdpartypackages/index.rst devel/index.rst mpl_toolkits/index.rst api/index.rst diff --git a/doc/resources/index.rst b/doc/resources/index.rst index 9da2874af856..15401b716f29 100644 --- a/doc/resources/index.rst +++ b/doc/resources/index.rst @@ -61,125 +61,3 @@ * `Anatomy of Matplotlib - IPython Notebooks `_ by Benjamin Root - -================= - Related Packages -================= - -Mapping Toolkits -**************** - - -.. _toolkit_basemap: - -Basemap -======= - -Plots data on map projections, with continental and political -boundaries, see `basemap `_ -docs. - -.. image:: /_static/basemap_contour1.png - :height: 400px - - - -Cartopy -======= - -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 -integration with Shapely for powerful yet easy-to-use vector data processing -tools. An example plot from the -`Cartopy gallery `_: - -.. image:: /_static/cartopy_hurricane_katrina_01_00.png - :height: 400px - - -.. _toolkits-shipped: - - -General Toolkits -**************** - - -.. _toolkit_mpldatacursor: - -MplDataCursor -============= - -`MplDataCursor `_ is a -toolkit written by Joe Kington to provide interactive "data cursors" -(clickable annotation boxes) for matplotlib. - - -.. _toolkit_natgrid: - -Natgrid -======= - -mpl_toolkits.natgrid is an interface to natgrid C library for gridding -irregularly spaced data. This requires a separate installation of the -`natgrid toolkit `__. - - -.. _toolkit_matplotlibvenn: - -Matplotlib-Venn -=============== - -`Matplotlib-Venn `_ provides a set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn diagrams. - -mplstereonet -=============== - -`mplstereonet `_ provides stereonets for plotting and analyzing orientation data in Matplotlib. - - -.. _hl_plotting: - -High-Level Plotting -******************* - -Several projects have started to provide a higher-level interface to -matplotlib. These are independent projects. - -.. _toolkit_seaborn: - -seaborn -======= - -`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. - -.. _toolkit_ggplot: - -ggplot -====== - -`ggplot `_ is a port of the R ggplot2 -to python based on matplotlib. - - -.. _toolkit_prettyplotlib: - -prettyplotlib -============= - -`prettyplotlib `_ is an extension -to matplotlib which changes many of the defaults to make plots some -consider more attractive. - - -iTerm2 terminal backend -======================= - -`matplotlib_iterm2 `_ is an -external matplotlib backend uses iTerm2 nightly build inline image display -feature. - -.. image:: /_static/matplotlib_iterm2_demo.png diff --git a/doc/thirdpartypackages/index.rst b/doc/thirdpartypackages/index.rst new file mode 100644 index 000000000000..05be0f6589b9 --- /dev/null +++ b/doc/thirdpartypackages/index.rst @@ -0,0 +1,128 @@ +.. _thirdparty-index: + +********************* + Third party packages +********************* + +Several external packages that extend or build on Matplotlib functionality +exist. Below we list a number of these. Please submit an issue or pull request +on Github if you have created a package that you would like to have included. + +.. _toolkits-general: + +General Toolkits +**************** + + +.. _toolkit_mpldatacursor: + +MplDataCursor +============= + +`MplDataCursor `_ is a +toolkit written by Joe Kington to provide interactive "data cursors" +(clickable annotation boxes) for matplotlib. + + +.. _toolkit_natgrid: + +Natgrid +======= + +mpl_toolkits.natgrid is an interface to natgrid C library for gridding +irregularly spaced data. This requires a separate installation of the +`natgrid toolkit `__. + + +.. _toolkit_matplotlibvenn: + +Matplotlib-Venn +=============== + +`Matplotlib-Venn `_ provides a set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn diagrams. + +mplstereonet +=============== + +`mplstereonet `_ provides stereonets for plotting and analyzing orientation data in Matplotlib. + + +.. _hl_plotting: + +High-Level Plotting +******************* + +Several projects have started to provide a higher-level interface to +matplotlib. These are independent projects. + +.. _toolkit_seaborn: + +seaborn +======= + +`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. + +.. _toolkit_ggplot: + +ggplot +====== + +`ggplot `_ is a port of the R ggplot2 +to python based on matplotlib. + + +.. _toolkit_prettyplotlib: + +prettyplotlib +============= + +`prettyplotlib `_ is an extension +to matplotlib which changes many of the defaults to make plots some +consider more attractive. + + +iTerm2 terminal backend +======================= + +`matplotlib_iterm2 `_ is an +external matplotlib backend uses iTerm2 nightly build inline image display +feature. + +.. image:: /_static/matplotlib_iterm2_demo.png + + +.. _toolkits-mapping: + +Mapping Toolkits +**************** + + +.. _toolkit_basemap: + +Basemap +======= + +Plots data on map projections, with continental and political +boundaries, see `basemap `_ +docs. + +.. image:: /_static/basemap_contour1.png + :height: 400px + + + +Cartopy +======= + +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 +integration with Shapely for powerful yet easy-to-use vector data processing +tools. An example plot from the +`Cartopy gallery `_: + +.. image:: /_static/cartopy_hurricane_katrina_01_00.png + :height: 400px From f6a4c7857139c0764ba243cebe6a792dfde1ee9c Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 13:58:50 +0100 Subject: [PATCH 21/32] Correct module name for axisartist --- doc/mpl_toolkits/axisartist/api/axis_artist_api.rst | 12 ++++++------ doc/mpl_toolkits/axisartist/api/index.rst | 2 +- doc/mpl_toolkits/axisartist/users/index.rst | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/mpl_toolkits/axisartist/api/axis_artist_api.rst b/doc/mpl_toolkits/axisartist/api/axis_artist_api.rst index f18a52daab65..e8705fc01b45 100644 --- a/doc/mpl_toolkits/axisartist/api/axis_artist_api.rst +++ b/doc/mpl_toolkits/axisartist/api/axis_artist_api.rst @@ -1,16 +1,16 @@ -:mod:`mpl_toolkits.axes_grid.axis_artist` -========================================= +:mod:`mpl_toolkits.axisartist.axis_artist` +========================================== -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisArtist +.. autoclass:: mpl_toolkits.axisartist.axis_artist.AxisArtist :members: :undoc-members: -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.Ticks +.. autoclass:: mpl_toolkits.axisartist.axis_artist.Ticks :members: -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisLabel +.. autoclass:: mpl_toolkits.axisartist.axis_artist.AxisLabel :members: -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.TickLabels +.. autoclass:: mpl_toolkits.axisartist.axis_artist.TickLabels :members: diff --git a/doc/mpl_toolkits/axisartist/api/index.rst b/doc/mpl_toolkits/axisartist/api/index.rst index 8084ed83cbee..069d82bc7c29 100644 --- a/doc/mpl_toolkits/axisartist/api/index.rst +++ b/doc/mpl_toolkits/axisartist/api/index.rst @@ -1,7 +1,7 @@ .. _axisartist-api-index: ####################################### - The Matplotlib Axisartist Toolkit API + The Matplotlib axisartist Toolkit API ####################################### :Release: |version| diff --git a/doc/mpl_toolkits/axisartist/users/index.rst b/doc/mpl_toolkits/axisartist/users/index.rst index d2b6924d86a3..88f452378981 100644 --- a/doc/mpl_toolkits/axisartist/users/index.rst +++ b/doc/mpl_toolkits/axisartist/users/index.rst @@ -1,7 +1,7 @@ .. _axisartist_users-guide-index: ################################################ - The Matplotlib Axisartist Toolkit User's Guide + The Matplotlib axisartist Toolkit User's Guide ################################################ :Release: |version| From 3446e2cafc49eb08a59b2e5435c871213742e316 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 13:59:08 +0100 Subject: [PATCH 22/32] Correct links on front page --- doc/_templates/index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 1bc285acaa47..6cb480c08af4 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -160,13 +160,21 @@

Need help?

Toolkits

-

There are several matplotlib add-on toolkits, -including a choice of two projection and mapping toolkits basemap and -cartopy, -3d plotting with mplot3d, -axes and axis helpers in axes_grid and more. +

Matplotlib ships with several add-on toolkits, + Including 3d plotting with mplot3d, + axes helpers in axes_grid1 and + axis helpers in axisartist.

+

Third party packages

+ +

A large number of third party packages + extend and build on Matplotlib functionality, + including a choice of two projection and mapping toolkits + basemap and + cartopy +

+

Citing matplotlib

From dd8a7822b1cb92f58eb637f301618e6354bcab95 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 14:21:18 +0100 Subject: [PATCH 23/32] Update examples readme --- examples/README.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/README.txt b/examples/README.txt index 4cd6bafca2c2..cd1b6a8327ee 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -19,7 +19,9 @@ directories found here: * api - working with the matplotlib API directory. - * axes_grid - Examples related to the AxesGrid toolkit + * axes_grid1 - Examples related to the axes_grid1 toolkit + + * axisartist - Examples related to the axisartist toolkit * event_handling - how to interact with your figure, mouse presses, key presses, object picking, etc. From 0635dfe2d4941b6d6bfcf3a341189a838bd6b228 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 14:44:52 +0100 Subject: [PATCH 24/32] Remove the use of axes_grid from plotting userguide --- doc/users/plotting/examples/anchored_box01.py | 2 +- doc/users/plotting/examples/anchored_box02.py | 2 +- doc/users/plotting/examples/anchored_box03.py | 2 +- doc/users/plotting/examples/annotate_explain.py | 4 ++-- doc/users/plotting/examples/connectionstyle_demo.py | 4 ++-- doc/users/plotting/examples/simple_annotate01.py | 5 +++-- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/users/plotting/examples/anchored_box01.py b/doc/users/plotting/examples/anchored_box01.py index 517a2f88d151..509e6acf0962 100644 --- a/doc/users/plotting/examples/anchored_box01.py +++ b/doc/users/plotting/examples/anchored_box01.py @@ -1,5 +1,5 @@ import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText +from matplotlib.offsetbox import AnchoredText fig=plt.figure(1, figsize=(3,3)) ax = plt.subplot(111) diff --git a/doc/users/plotting/examples/anchored_box02.py b/doc/users/plotting/examples/anchored_box02.py index 6f8db6dd8de8..d2a2ed7b3e5c 100644 --- a/doc/users/plotting/examples/anchored_box02.py +++ b/doc/users/plotting/examples/anchored_box02.py @@ -1,6 +1,6 @@ from matplotlib.patches import Circle import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea +from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea fig=plt.figure(1, figsize=(3,3)) ax = plt.subplot(111) diff --git a/doc/users/plotting/examples/anchored_box03.py b/doc/users/plotting/examples/anchored_box03.py index 0848e1b9d270..371ec9f68052 100644 --- a/doc/users/plotting/examples/anchored_box03.py +++ b/doc/users/plotting/examples/anchored_box03.py @@ -1,6 +1,6 @@ from matplotlib.patches import Ellipse import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox +from mpl_toolkits.axes_grid1.anchored_artists import AnchoredAuxTransformBox fig=plt.figure(1, figsize=(3,3)) ax = plt.subplot(111) diff --git a/doc/users/plotting/examples/annotate_explain.py b/doc/users/plotting/examples/annotate_explain.py index 6dadbd5e541b..12cc94e2aa70 100644 --- a/doc/users/plotting/examples/annotate_explain.py +++ b/doc/users/plotting/examples/annotate_explain.py @@ -7,8 +7,8 @@ fig = plt.figure(1, figsize=(8,3)) fig.clf() -from mpl_toolkits.axes_grid.axes_grid import AxesGrid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText +from mpl_toolkits.axes_grid1.axes_grid import AxesGrid +from matplotlib.offsetbox import AnchoredText #from matplotlib.font_manager import FontProperties diff --git a/doc/users/plotting/examples/connectionstyle_demo.py b/doc/users/plotting/examples/connectionstyle_demo.py index baa68fab5ad0..86757f2104e6 100644 --- a/doc/users/plotting/examples/connectionstyle_demo.py +++ b/doc/users/plotting/examples/connectionstyle_demo.py @@ -4,8 +4,8 @@ fig = plt.figure(1, figsize=(8,5)) fig.clf() -from mpl_toolkits.axes_grid.axes_grid import AxesGrid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText +from mpl_toolkits.axes_grid1.axes_grid import AxesGrid +from matplotlib.offsetbox import AnchoredText #from matplotlib.font_manager import FontProperties diff --git a/doc/users/plotting/examples/simple_annotate01.py b/doc/users/plotting/examples/simple_annotate01.py index 434b09efa22e..eb99af25babd 100644 --- a/doc/users/plotting/examples/simple_annotate01.py +++ b/doc/users/plotting/examples/simple_annotate01.py @@ -7,8 +7,8 @@ fig = plt.figure(1) fig.clf() -from mpl_toolkits.axes_grid.axes_grid import Grid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText +from mpl_toolkits.axes_grid1.axes_grid import Grid +from matplotlib.offsetbox import AnchoredText from matplotlib.font_manager import FontProperties @@ -129,3 +129,4 @@ def add_at(ax, t, loc=2): #ax.set_xlim(0, 1) #ax.set_ylim(0, 1) plt.draw() +plt.show() From 3b5251332fbfaf8961362feefcfdbf044c9db536 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 14:45:10 +0100 Subject: [PATCH 25/32] remove pre python26 workaround --- doc/users/plotting/examples/demo_gridspec06.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/doc/users/plotting/examples/demo_gridspec06.py b/doc/users/plotting/examples/demo_gridspec06.py index e1fbaf5c5f99..32084dfa960b 100644 --- a/doc/users/plotting/examples/demo_gridspec06.py +++ b/doc/users/plotting/examples/demo_gridspec06.py @@ -1,19 +1,7 @@ import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np - -try: - from itertools import product -except ImportError: - # product is new in v 2.6 - def product(*args, **kwds): - pools = map(tuple, args) * kwds.get('repeat', 1) - result = [[]] - for pool in pools: - result = [x+[y] for x in result for y in pool] - for prod in result: - yield tuple(prod) - +from itertools import product def squiggle_xy(a, b, c, d, i=np.arange(0.0, 2*np.pi, 0.05)): return np.sin(i*a)*np.cos(i*b), np.sin(i*c)*np.cos(i*d) @@ -50,4 +38,3 @@ def squiggle_xy(a, b, c, d, i=np.arange(0.0, 2*np.pi, 0.05)): ax.spines['right'].set_visible(True) plt.show() - From 5846f7772d0e10b42777a118a5ffeb3114db7275 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 14:51:42 +0100 Subject: [PATCH 26/32] axes_grid to axes_grid1 in whatsnew --- doc/pyplots/whats_new_99_axes_grid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/pyplots/whats_new_99_axes_grid.py b/doc/pyplots/whats_new_99_axes_grid.py index e3cb7fa4217d..354eadf7dfdb 100644 --- a/doc/pyplots/whats_new_99_axes_grid.py +++ b/doc/pyplots/whats_new_99_axes_grid.py @@ -1,6 +1,6 @@ import numpy as np import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axes_rgb import RGBAxes +from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes def get_demo_image(): # prepare image From 6e805cfa3eddb55316666ae013d8dcca16536bad Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 29 Dec 2015 14:56:59 +0100 Subject: [PATCH 27/32] Don't mention axes_grid in the annotation guide --- doc/users/annotations_guide.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/users/annotations_guide.rst b/doc/users/annotations_guide.rst index 70ef8c42fdaf..12c78d55b713 100644 --- a/doc/users/annotations_guide.rst +++ b/doc/users/annotations_guide.rst @@ -194,9 +194,10 @@ Placing Artist at the anchored location of the Axes There are class of artist that can be placed at the anchored location of the Axes. A common example is the legend. This type of artists can be created by using the OffsetBox class. A few predefined classes are -available in ``mpl_toolkits.axes_grid.anchored_artists``. :: +available in ``mpl_toolkits.axes_grid1.anchored_artists`` others in +``matplotlib.offsetbox`` :: - from mpl_toolkits.axes_grid.anchored_artists import AnchoredText + from matplotlib.offsetbox import AnchoredText at = AnchoredText("Figure 1a", prop=dict(size=8), frameon=True, loc=2, @@ -220,7 +221,7 @@ drawing area. Note that the extents of the artists that are added to the drawing area has nothing to do with the placement of the drawing area itself. The initial size only matters. :: - from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea + from mpl_toolkits.axes_grid1.anchored_artists import AnchoredDrawingArea ada = AnchoredDrawingArea(20, 20, 0, 0, loc=1, pad=0., frameon=False) @@ -242,7 +243,7 @@ other coordinate than canvas pixel). You can use ``AnchoredDrawingArea`` except that the extent of the artist is determined during the drawing time respecting the specified transform. :: - from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox + from mpl_toolkits.axes_grid1.anchored_artists import AnchoredAuxTransformBox box = AnchoredAuxTransformBox(ax.transData, loc=2) el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! @@ -375,7 +376,7 @@ Advanced Topics Zoom effect between Axes ======================== -mpl_toolkits.axes_grid.inset_locator defines some patch classes useful +``mpl_toolkits.axes_grid1.inset_locator`` defines some patch classes useful for interconnect two axes. Understanding the code requires some knowledge of how mpl's transform works. But, utilizing it will be straight forward. From 969982e9c04828e0e5db16fc0088cb6a48da35f9 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Wed, 30 Dec 2015 12:15:54 +0000 Subject: [PATCH 28/32] Remove toc trees --- doc/mpl_toolkits/index.rst | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index e858cd84190c..58a0a2bcc91e 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -22,10 +22,6 @@ Toolkits are collections of application-specific functions that extend matplotli mplot3d ======= -.. toctree:: - :maxdepth: 2 - - mplot3d/index :ref:`mpl_toolkits.mplot3d ` provides some basic 3D plotting (scatter, surf, @@ -39,10 +35,6 @@ solution for some use cases. axes_grid1 ========== -.. toctree:: - :maxdepth: 2 - - axes_grid1/index The :ref:`mpl_toolkits.axisgrid1 ` toolkit is a @@ -57,10 +49,6 @@ collection of helper classes to ease displaying multiple axes in matplotlib. axisartist ========== -.. toctree:: - :maxdepth: 2 - - axisartist/index The :ref:`mpl_toolkits.axisartist ` toolkit contains From 00cdd552b5459b2f2624cbdddecee2c5cf364c2b Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Wed, 30 Dec 2015 12:24:07 +0000 Subject: [PATCH 29/32] Add note about the Matplotlib github org --- doc/thirdpartypackages/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/thirdpartypackages/index.rst b/doc/thirdpartypackages/index.rst index 05be0f6589b9..6378b11bf2f5 100644 --- a/doc/thirdpartypackages/index.rst +++ b/doc/thirdpartypackages/index.rst @@ -7,6 +7,8 @@ Several external packages that extend or build on Matplotlib functionality exist. Below we list a number of these. Please submit an issue or pull request on Github if you have created a package that you would like to have included. +We are also happy to host third party packages within the `Matplotlib Github +Organization `_. .. _toolkits-general: From e47e071eeab2d7bb4b5971559e9ce74bfa62e025 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Wed, 30 Dec 2015 12:28:22 +0000 Subject: [PATCH 30/32] Correct typos found by mdboom --- doc/_templates/index.html | 2 +- doc/mpl_toolkits/axisartist/overview.rst | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/_templates/index.html b/doc/_templates/index.html index 6cb480c08af4..1cdc30fb58c4 100644 --- a/doc/_templates/index.html +++ b/doc/_templates/index.html @@ -172,7 +172,7 @@

Third party packages

extend and build on Matplotlib functionality, including a choice of two projection and mapping toolkits basemap and - cartopy + cartopy.

Citing matplotlib

diff --git a/doc/mpl_toolkits/axisartist/overview.rst b/doc/mpl_toolkits/axisartist/overview.rst index 7252c5d96061..a284b5e247fe 100644 --- a/doc/mpl_toolkits/axisartist/overview.rst +++ b/doc/mpl_toolkits/axisartist/overview.rst @@ -17,7 +17,7 @@ curved coordinate systems. .. plot:: mpl_toolkits/axisartist/examples/demo_floating_axis.py -Since it uses a special artists, some mpl commands that work on +Since it uses special artists, some mpl commands that work on Axes.xaxis and Axes.yaxis may not work. axisartist @@ -25,14 +25,14 @@ axisartist *axisartist* module provides a custom (and very experimental) Axes class, where each axis (left, right, top and bottom) have a separate -artist associated which is responsible to draw axis-line, ticks, +associated artist which is responsible to draw axis-line, ticks, ticklabels, label. Also, you can create your own axis, which can pass through a fixed position in the axes coordinate, or a fixed position in the data coordinate (i.e., the axis floats around when viewlimit changes). -The axes class, by default, have its xaxis and yaxis invisible, and -has 4 additional artists which are responsible to draw axis in +The axes class, by default, has its xaxis and yaxis invisible, and +has 4 additional artists which are responsible for drawing the 4 axis sides in "left","right","bottom" and "top". They are accessed as ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a dictionary that contains artists (note that ax.axis is still a From e817d397930736b6d759a51e1ee3db0eeef7b5eb Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Wed, 30 Dec 2015 12:42:13 +0000 Subject: [PATCH 31/32] Add api changes about deprecating axes_grid --- doc/api/api_changes/2015-12-30-JHN.rst | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/api/api_changes/2015-12-30-JHN.rst diff --git a/doc/api/api_changes/2015-12-30-JHN.rst b/doc/api/api_changes/2015-12-30-JHN.rst new file mode 100644 index 000000000000..317cc741db3b --- /dev/null +++ b/doc/api/api_changes/2015-12-30-JHN.rst @@ -0,0 +1,7 @@ +`mpl_toolkits.axes_grid` has been deprecated +```````````````````````````````````````````` + +All functionallity from `mpl_toolkits.axes_grid` can be found in either +`mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes from +`mpl_toolkits.axes_grid` based on `Axis` from `mpl_toolkits.axisartist` can be +fund in `mpl_toolkits.axisartist` From 301980c60a085055e3c9f47fe0adb9b170e9c24c Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Tue, 5 Jan 2016 17:35:23 +0000 Subject: [PATCH 32/32] Correct typos found by @WeatherGod --- doc/api/api_changes/2015-12-30-JHN.rst | 2 +- doc/mpl_toolkits/index.rst | 2 +- doc/thirdpartypackages/index.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/api_changes/2015-12-30-JHN.rst b/doc/api/api_changes/2015-12-30-JHN.rst index 317cc741db3b..64b826c26ef7 100644 --- a/doc/api/api_changes/2015-12-30-JHN.rst +++ b/doc/api/api_changes/2015-12-30-JHN.rst @@ -4,4 +4,4 @@ All functionallity from `mpl_toolkits.axes_grid` can be found in either `mpl_toolkits.axes_grid1` or `mpl_toolkits.axisartist`. Axes classes from `mpl_toolkits.axes_grid` based on `Axis` from `mpl_toolkits.axisartist` can be -fund in `mpl_toolkits.axisartist` +found in `mpl_toolkits.axisartist` diff --git a/doc/mpl_toolkits/index.rst b/doc/mpl_toolkits/index.rst index 58a0a2bcc91e..0e37f54e8c23 100644 --- a/doc/mpl_toolkits/index.rst +++ b/doc/mpl_toolkits/index.rst @@ -37,7 +37,7 @@ axes_grid1 ========== -The :ref:`mpl_toolkits.axisgrid1 ` toolkit is a +The :ref:`mpl_toolkits.axes_grid1 ` toolkit is a collection of helper classes to ease displaying multiple axes in matplotlib. diff --git a/doc/thirdpartypackages/index.rst b/doc/thirdpartypackages/index.rst index 6378b11bf2f5..00db36122991 100644 --- a/doc/thirdpartypackages/index.rst +++ b/doc/thirdpartypackages/index.rst @@ -90,7 +90,7 @@ iTerm2 terminal backend ======================= `matplotlib_iterm2 `_ is an -external matplotlib backend uses iTerm2 nightly build inline image display +external matplotlib backend using iTerm2 nightly build inline image display feature. .. image:: /_static/matplotlib_iterm2_demo.png