Skip to content

Reorganise mpl_toolkits documentation #5752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Jan 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
999786f
Move axesgrid1 api docs to axesgrid1
jenshnielsen Dec 26, 2015
8f461a2
Move non bundled packages from toolkits to resources
jenshnielsen Dec 26, 2015
b72e97a
Split documentation in axisartist and axes_grid1
jenshnielsen Dec 26, 2015
786c389
Move axisartist userguide to axisartist
jenshnielsen Dec 26, 2015
e9a9cc8
Remove warning
jenshnielsen Dec 26, 2015
a8ae5aa
Split axes_grid1 and axisartist examples
jenshnielsen Dec 26, 2015
60a8b7f
Correct links to examples
jenshnielsen Dec 26, 2015
535eb24
Correct links in whatsnew
jenshnielsen Dec 26, 2015
d49bbce
Correct links to gallery
jenshnielsen Dec 26, 2015
047ccb2
Split figures in axisartist and axisgrid1
jenshnielsen Dec 26, 2015
b1798b6
Correct links to figures
jenshnielsen Dec 26, 2015
138a6c1
Move axisartist docs
jenshnielsen Dec 26, 2015
ef84b93
Move overview docs up one level
jenshnielsen Dec 26, 2015
b41caa4
Clarify index
jenshnielsen Dec 28, 2015
44fb5ea
Update axes_grid1 overview
jenshnielsen Dec 29, 2015
9862d43
Update axes_grid1 some more
jenshnielsen Dec 29, 2015
a2d8009
update axisartist
jenshnielsen Dec 29, 2015
69705a7
Copy all remaing functionality from axes_grid to axisartist
jenshnielsen Dec 29, 2015
b17e5d6
Deprecate mpl_toolkits.axes_grid
jenshnielsen Dec 29, 2015
74da787
Move third party packages to its own toplevel index
jenshnielsen Dec 29, 2015
f6a4c78
Correct module name for axisartist
jenshnielsen Dec 29, 2015
3446e2c
Correct links on front page
jenshnielsen Dec 29, 2015
dd8a782
Update examples readme
jenshnielsen Dec 29, 2015
0635dfe
Remove the use of axes_grid from plotting userguide
jenshnielsen Dec 29, 2015
3b52513
remove pre python26 workaround
jenshnielsen Dec 29, 2015
5846f77
axes_grid to axes_grid1 in whatsnew
jenshnielsen Dec 29, 2015
6e805cf
Don't mention axes_grid in the annotation guide
jenshnielsen Dec 29, 2015
969982e
Remove toc trees
jenshnielsen Dec 30, 2015
00cdd55
Add note about the Matplotlib github org
jenshnielsen Dec 30, 2015
e47e071
Correct typos found by mdboom
jenshnielsen Dec 30, 2015
e817d39
Add api changes about deprecating axes_grid
jenshnielsen Dec 30, 2015
301980c
Correct typos found by @WeatherGod
jenshnielsen Jan 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions doc/_templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,21 @@ <h4>Need help?</h4>

<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>
Expand Down
7 changes: 7 additions & 0 deletions doc/api/api_changes/2015-12-30-JHN.rst
Original file line number Diff line number Diff line change
@@ -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`
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
)
Expand Down
1 change: 1 addition & 0 deletions doc/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
18 changes: 0 additions & 18 deletions doc/mpl_toolkits/axes_grid/api/axes_divider_api.rst

This file was deleted.

11 changes: 0 additions & 11 deletions doc/mpl_toolkits/axes_grid/api/axes_grid_api.rst

This file was deleted.

6 changes: 0 additions & 6 deletions doc/mpl_toolkits/axes_grid/api/axes_size_api.rst

This file was deleted.

16 changes: 0 additions & 16 deletions doc/mpl_toolkits/axes_grid/api/axis_artist_api.rst

This file was deleted.

1 change: 0 additions & 1 deletion doc/mpl_toolkits/axes_grid/examples

This file was deleted.

36 changes: 0 additions & 36 deletions doc/mpl_toolkits/axes_grid/index.rst

This file was deleted.

18 changes: 18 additions & 0 deletions doc/mpl_toolkits/axes_grid1/api/axes_divider_api.rst
Original file line number Diff line number Diff line change
@@ -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:
11 changes: 11 additions & 0 deletions doc/mpl_toolkits/axes_grid1/api/axes_grid_api.rst
Original file line number Diff line number Diff line change
@@ -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:
5 changes: 5 additions & 0 deletions doc/mpl_toolkits/axes_grid1/api/axes_size_api.rst
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions doc/mpl_toolkits/axes_grid1/examples
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -46,4 +46,3 @@ def get_demo_image():

plt.draw()
plt.show()

Original file line number Diff line number Diff line change
@@ -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))
Expand All @@ -22,4 +22,3 @@
cb2 = colorbar(im2, cax=cax2, orientation="horizontal")
cax2.xaxis.set_ticks_position("top")
plt.show()

Original file line number Diff line number Diff line change
@@ -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():

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -25,6 +25,5 @@
ax4.set_axes_locator(divider.new_locator(nx=2, nx1=4, ny=0))



plt.draw()
plt.show()
Original file line number Diff line number Diff line change
@@ -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.))
Expand Down
Original file line number Diff line number Diff line change
@@ -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


Expand Down
29 changes: 29 additions & 0 deletions doc/mpl_toolkits/axes_grid1/index.rst
Original file line number Diff line number Diff line change
@@ -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
Loading