Reorganise mpl_toolkits documentation #5752

Merged
merged 32 commits into from Jan 8, 2016
Commits
Jump to file
+626 −536
Split
View
@@ -160,13 +160,21 @@
<h1>Toolkits</h1>
-<p>There are several matplotlib add-on <a href="{{ pathto('mpl_toolkits/index') }}">toolkits</a>,
-including a choice of two projection and mapping toolkits <a href="http://matplotlib.org/basemap">basemap</a> and
-<a href="http://scitools.org.uk/cartopy/docs/latest">cartopy</a>,
-3d plotting with <a href="{{ pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>,
-axes and axis helpers in <a href="{{ pathto('mpl_toolkits/axes_grid/index') }}">axes_grid</a> and more.
+<p>Matplotlib ships with several add-on <a href="{{ pathto('mpl_toolkits/index') }}">toolkits</a>,
+ Including 3d plotting with <a href="{{ pathto('mpl_toolkits/mplot3d/index') }}">mplot3d</a>,
+ axes helpers in <a href="{{ pathto('mpl_toolkits/axes_grid1/index') }}">axes_grid1</a> and
+ axis helpers in <a href="{{ pathto('mpl_toolkits/axisartist/index') }}">axisartist</a>.
</p>
+<h1>Third party packages</h1>
+
+<p>A large number of third party <a href="{{ pathto('mpl_toolkits/index') }}">packages</a>
+ extend and build on Matplotlib functionality,
+ including a choice of two projection and mapping toolkits
+ <a href="http://matplotlib.org/basemap">basemap</a> and
+ <a href="http://scitools.org.uk/cartopy/docs/latest">cartopy</a>.
+</p>
+
<h1>Citing matplotlib</h1>
<p>
@@ -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
+found in `mpl_toolkits.axisartist`
View
@@ -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'),
)
View
@@ -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
View
@@ -149,7 +149,8 @@ def all():
required_symlinks = [
('mpl_examples', '../examples/'),
- ('mpl_toolkits/axes_grid/examples', '../../../examples/axes_grid/')
+ ('mpl_toolkits/axes_grid1/examples', '../../../examples/axes_grid1/'),
+ ('mpl_toolkits/axisartist/examples', '../../../examples/axisartist/')
]
symlink_warnings = []
@@ -1,18 +0,0 @@
-
-:mod:`mpl_toolkits.axes_grid.axes_divider`
-==========================================
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_divider.Divider
- :members:
- :undoc-members:
-
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesLocator
- :members:
- :undoc-members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_divider.SubplotDivider
- :members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesDivider
- :members:
@@ -1,11 +0,0 @@
-
-:mod:`mpl_toolkits.axes_grid.axes_grid`
-=======================================
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_grid.Grid
- :members:
- :undoc-members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axes_grid.ImageGrid
- :members:
- :undoc-members:
@@ -1,6 +0,0 @@
-:mod:`mpl_toolkits.axes_grid.axes_size`
-=======================================
-
-.. automodule:: mpl_toolkits.axes_grid.axes_size
- :members: Fixed, Scaled, AxesX, AxesY, MaxWidth, MaxHeight, Fraction, Padded, from_any
-
@@ -1,16 +0,0 @@
-
-:mod:`mpl_toolkits.axes_grid.axis_artist`
-=========================================
-
-.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisArtist
- :members:
- :undoc-members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axis_artist.Ticks
- :members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisLabel
- :members:
-
-.. autoclass:: mpl_toolkits.axes_grid.axis_artist.TickLabels
- :members:
@@ -1,36 +0,0 @@
-
-.. _toolkit_axesgrid-index:
-
-Matplotlib AxesGrid 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
-multiple axes according to their aspects.
-
-
-.. image:: ../../_static/demo_axes_grid.png
-
-.. 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
- 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)
-
-.. toctree::
- :maxdepth: 2
-
- users/overview.rst
- users/index.rst
- api/index.rst
@@ -0,0 +1,18 @@
+
+:mod:`mpl_toolkits.axes_grid1.axes_divider`
+===========================================
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.Divider
+ :members:
+ :undoc-members:
+
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.AxesLocator
+ :members:
+ :undoc-members:
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.SubplotDivider
+ :members:
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_divider.AxesDivider
+ :members:
@@ -0,0 +1,11 @@
+
+:mod:`mpl_toolkits.axes_grid1.axes_grid`
+========================================
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_grid.Grid
+ :members:
+ :undoc-members:
+
+.. autoclass:: mpl_toolkits.axes_grid1.axes_grid.ImageGrid
+ :members:
+ :undoc-members:
@@ -0,0 +1,5 @@
+:mod:`mpl_toolkits.axes_grid1.axes_size`
+========================================
+
+.. automodule:: mpl_toolkits.axes_grid1.axes_size
+ :members: Fixed, Scaled, AxesX, AxesY, MaxWidth, MaxHeight, Fraction, Padded, from_any
@@ -1,28 +1,16 @@
-.. _axes_grid-api-index:
+.. _axes_grid1-api-index:
#######################################
- The Matplotlib AxesGrid Toolkit API
+ The Matplotlib axes_grid1 Toolkit API
#######################################
:Release: |version|
:Date: |today|
.. toctree::
+ anchored_artists_api.rst
axes_size_api.rst
axes_divider_api.rst
axes_grid_api.rst
- axis_artist_api.rst
-
-
-#######################################
- The Matplotlib axes_grid1 Toolkit API
-#######################################
-
-:Release: |version|
-:Date: |today|
-
-.. toctree::
-
- anchored_artists_api.rst
inset_locator_api.rst
@@ -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()
-
@@ -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()
-
@@ -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():
@@ -10,12 +10,11 @@
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)
cb2.ax.set_yticks([1, 3])
ax2.set_title("AxesGrid's colorbar w/\nset_yticks([1,3])", size=10)
plt.show()
-
@@ -1,12 +1,12 @@
-from mpl_toolkits.axes_grid import Size, Divider
+from mpl_toolkits.axes_grid1 import Size, Divider
import matplotlib.pyplot as plt
fig1 = plt.figure(1, (6, 6))
# 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()
@@ -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
fig1 = plt.figure(1, (5.5, 4.))
@@ -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
@@ -0,0 +1,29 @@
+
+.. _toolkit_axesgrid1-index:
+
+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
+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.
+
+
+.. image:: ../../_static/demo_axes_grid.png
+
+.. 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, 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.
+
+.. toctree::
+ :maxdepth: 2
+
+ overview.rst
+ users/index.rst
+ api/index.rst
Oops, something went wrong.